Oracle complex stuff

Feature requests and their debate

Oracle complex stuff

Postby Vrokolos » Tue Jun 26, 2012 9:49 am

Vrokolos
 
Posts: 3
Joined: Sun Jun 24, 2012 12:24 am

Re: Oracle complex stuff

Postby Serge » Wed Jun 27, 2012 2:14 pm

Hi!

Package/procedure navigation is already in Oracle plugin TODO list.
Execute script feature is a little bit more complicated.
Yes, currently DBeaver tokenizes script with ";" character and executes each statement separately. This approach allows user to see execution progress and reexecute script from any position. But, you are right, it fails to execute complex SQL statements (like CREATE/ALTER TRIGGER etc) which contains delimiters themselves. There are two possible solutions:
1. Try to parse SQL script correctly and execute complex statements one by one. It is really not an easy task to implement and it has serious disadvantage: if script contains some specific constructions (e.g. for Oracle SQLPlus ) then script will be broken.
2. Execute whole script as a single statement. Disadvantages: no execution progress and hard to understand error position if script fails. Moreover some database drivers doesn't support scripts execution so this feature will driver-dependent.
I think finally we'll make some compromise solution.

Note: you may execute scripts using SQLPlus tool (accessible from context/main menu for Oracle databases)
Serge
 
Posts: 1526
Joined: Sat Feb 26, 2011 8:24 pm
Location: SPb

Re: Oracle complex stuff

Postby Vrokolos » Wed Jun 27, 2012 7:34 pm

TOAD for oracle uses the "/" between blocks to separate scripts into different ones. I believe SQL plus does the same. You might want to use that delimiter instead
Vrokolos
 
Posts: 3
Joined: Sun Jun 24, 2012 12:24 am

Re: Oracle complex stuff

Postby Serge » Wed Jun 27, 2012 9:14 pm

Actually it is not so easy.

- SQLPlus may use different statement/block delimiters (by using SET command). So DBeaver has to understand SQLPlus commands syntax (at least partially)
- DBeaver needs to know basics of PL/SQL to understand when SQL block begins/ends
- DBeaver is not just Oracle client, it has to support a lot of different SQL dialects. E.g.DB2 and SQL Server have their own nuances in script execution.

Anyway. Improvement of scripts execution is a priority task for future DBeaver version. I'm not promising that it will fully support SQLPlus or PL/SQL syntax but at least it should understand simple cases (like standard SQL blocks delimited by /).
And,for sure, I'm always open for any particular suggestions :)

Thanks!
Serge
 
Posts: 1526
Joined: Sat Feb 26, 2011 8:24 pm
Location: SPb


Return to Feature Requests



Who is online

Users browsing this forum: No registered users and 6 guests