run in SQLPLUS - suggestion

shayt

Member²
hi,

i am using version 7.0.2.1076.

if i have a script in a SQL window,
i would like to run this script in a REAL SQLPLUS session.

currently the only reason i am still using TOAD (and PLSQL Developer for other things) , is for this feature !!!

because in my company, the script we are making needs to be compatible with SQLPLUS, so we make scripts, but then run them on SQLPLUS.

and using this feature in TOAD, we are just opening the script, updating it, and one click, and it is running in a real sqlplus session.

and no, i don't want to use the command window.

Thanks,
Shay
 
Shay,

this is very easy, first you open a script in PL/SQL Developer
sqlplus1.jpg


Then you go to "Dialog" tab and enter "sqlplus". After that PL/SQL developer will call SQL*Plus and pass over current login and script information
sqlplus2.jpg
 
he he he, actually I did may be two years ago :)

but I'm not using this functionality too often, only when I need something that is not supported by PL/SQL Developer.
 
How very cool! Thanks Slava!

However, I just noticed when I tried it that it doesn't open SQL*plus with the same default directory as if I opened it from my desktop. I have my desktop icon set to Start In my working directory where I keep lots of scripts handy.

So if I enter: @jump another_schema

it can't find the file jump.sql

Oh well, it's still very useful!
 
The @ command searches for scripts as follows (in order of precedence):

1. The default directory of PL/SQL Developer.
2. The directory of the calling script (if any).
3. The Command file directory specified in the preferences.
4. The directories specified in the SQLPATH registry key.
5. The directories specified in the ORACLE_PATH registry key.
 
Something else you can try is to configure a toolbar icon to open sqlplus.

Go into Tools | Configure Tools...
Create a new tool and under the general tab put the executable path as the location of your sqlplusw.exe and parameters as #connect. This also allows you to set the default path.

Then create a toolbar button under the Button tab and you can add this to your toolbar.
 
Back
Top