jnowlin
asked on
Starting SQL+ Scripts from Anywhere
Hello.
Is there a way to run a SQL script file
from anywhere, no matter what directory/folder it's located? In the old DOS days (and to some extent, Windows) you had a path statement in the AUTOEXEC.BAT file, or you could set the PATH environment with SET PATH=....
Does Oracle provide a similar method to do this? i.e. Perhaps directories/folders off of the BIN directory/folder would enable one to run
the program using only:
SQL>start filename.sql
instead of typing the full path to the file each and every time. Or, perhaps one could have a script named go.sql which would accept a filename as its argument.
Any suggestions?
Jim
Is there a way to run a SQL script file
from anywhere, no matter what directory/folder it's located? In the old DOS days (and to some extent, Windows) you had a path statement in the AUTOEXEC.BAT file, or you could set the PATH environment with SET PATH=....
Does Oracle provide a similar method to do this? i.e. Perhaps directories/folders off of the BIN directory/folder would enable one to run
the program using only:
SQL>start filename.sql
instead of typing the full path to the file each and every time. Or, perhaps one could have a script named go.sql which would accept a filename as its argument.
Any suggestions?
Jim
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Go to your registry and set the value:
ORACLE_PATH to the path you want Oracle to search when looking for your script.
I have another suggestion.
By the way, all answers to all your questions can be easily found in the docs on your CD.
ORACLE_PATH to the path you want Oracle to search when looking for your script.
I have another suggestion.
By the way, all answers to all your questions can be easily found in the docs on your CD.
ASKER
Mr. Gokman, you are a DBA. I regret that the local library didn't have your book on hand. It must surely be very helpful and informative.
Our instructor told us that
DBAs are like God and that we should get to know very well these people, stay on there good side. Any suggestions along these lines sir?
Jim Nowlin
Princeton, MA U.S.A.
Our instructor told us that
DBAs are like God and that we should get to know very well these people, stay on there good side. Any suggestions along these lines sir?
Jim Nowlin
Princeton, MA U.S.A.
C:
cd C:\MYSCRIPTS
sqlplus
Now, if filename.sql is in C:\MYSCRIPTS you could type:
SQL>start filename.sql