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.

5
  • this would help. dbeaver.jkiss.org/forum/viewtopic.php?f=2&t=744
    – atokpas
    Mar 3, 2016 at 13:27
  • I was aware of this feature. Like this I'm not able to launch all the script in a folder sequentially.
    – Samuryte
    Mar 3, 2016 at 13:40
  • 1
    why are you looking for an alternative to SQLDev? Mar 3, 2016 at 15:18
  • 1
    The "@" syntax is a sqlplus directive, also supported by SQL Dev. It is NOT a sql syntax, so there should be no expectation that it would be supported by other client programs. I agree with Jeff, why not just use SQL Dev?
    – EdStevens
    Mar 4, 2016 at 0:21
  • 4
    That is not true because with Toad for Oracle you can use the @ as in SQLDev for launching scripts. The reason why I'm looking for a SQL Dev alternative is because I don't find it very stable, it's limited to Oracle and since I have to manage also MySQL and Postgres database, I'm looking for an unified solution.
    – Samuryte
    Mar 4, 2016 at 11:26

1 Answer 1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.