11

I'm trying to find a good alternative to SQL Developer for performing queries and scripts on Oracle instances.

I find DBeaver to be an interesting tool, it has a lot of great features, BUT it seems to lack an essential element: The possibility to launch scripts from the filesystem of the client machine in a batch-like way.

For example, in SQL Developer I simply put a file called delta_script.sql that contains:

@script1.sql
@script2.sql
@script3.sql

I execute it as a script and the software executes all of the files in the correct order (provided that they are in the same directory as the delta_script.sql file).

On DBeaver, this does not happen, instead I get a [900] ORA-00900: invalid SQL statement..

How can I manage this to work as expected?

I have tried the following in the delta_script.sql file with no luck:

  • @@ scriptN.sql
  • @/tmp/folder/scriptN.sql
  • @"/tmp/folder/scriptN.sql"
  • @"scriptN.sql"

They're all giving the same error, so I think there's a problem with the "@". I have tried from SQLPlus with the synthax I use on SQL Developer without errors.

Samuryte
  • 111
  • 1
  • 1
  • 4

2 Answers2

0

Arobase @ is an SQLPlus alias.

https://datacadamia.com/lang/sqlplus/arobase

Alias
The character specials @ can also be used to start a script.
The character special @@ permits to start it from a relative path.
? means the ORACLE Home directory

It is an equivalent for START

https://datacadamia.com/lang/sqlplus/start_command

Syntax
STA[RT] {url|file_name} [arg ...]

Make sure you use the "Execute in SQL Plus" (when connected, right click on connection > Tools > "Execute in SQL Plus") option.

Hybris95
  • 310
  • 2
  • 13
-2

Try Pl/SQL developer from allround automation. Then start a command window.