can u try running them like @<your patch here>/EMSTATUS.sql;
What version of SQL Developer? It is working for me in 4 EA2.
All scripts are in the same directory.
Putting the cursor on @multiscript and hitting either f5 or f9 will run both contained scripts.
I've tried with an exit in the first script and without. Works either way.
Try experimenting with simpler scripts to eliminate
If you are planning to turn this into a production system you should probably use sqlplus rather than sqldeveloper. SQLDeveloper's sqlplus compatibility isn't perfect yet, so try testing with sqlplus as well.
I have version 3.1.07. I do not have access to sqlplus and will not be running this on a server. It will be a process my team runs monthly using SQLDeveloper and I'm trying to simplify it as much as possible so that each individual script doesn't have to be kicked off separately (there are 17 in the sequence).
I have all scripts in the same directory. When I try what you described above and run the command @multiscript, it throws an error for each command on my multiscript.sql file saying it can't open the file referenced. So it is running through every line now, but it says it can't open the files. However, if I run it directly from within the multiscript.sql file by pressing F5, it runs the first command and then stops. So it can find the file there and execute it, but it won't go past the first line.
I'm not seeing this in either 3.2.20.09, or 4.0 EA2.
I wonder if it is something which was fixed between 3.1 and 3.2. Can you upgrade?
I upgraded and now my worksheet referring to the multiscript.sql file no longer throws the error indicating it can't open the files. However, it is now giving me the same issue as when I try to run it from the multiscript.sql file itself - it runs the first command and stops!
Could there be something in the individual scripts causing an abort?
I don't think so because if I change the order, it always runs the first one and then stops.
Note you can put a path in: Tools->Preferences->Database->Worksheet->'Select default path to look for scripts'
I tried the following:
set echo on
select 'finished' from dual;
select 'one' from dual;
select 'two' from sql;
in a worksheet run:
> select 'one' from dual
> select 'two' from dual
> select 'finished' from dual
Things that could go wrong:
Your scripts could end with 'exit'.
The paths could get mixed up: try @ (not @@) and full paths.
You could have hit a code issue which the worksheet does not recover from - in which case you should get output on the command line and or Logging Page in view messages.
Well that's embarassing! The issue was that each of my reference scripts did end with an Exit statement. Once I removed that, everything works as expected. I'm glad it was such an easy fix.
Thank you so much for your time and knowledge!!