Changing the current directory while running an SQL script [message #278272] |
Fri, 02 November 2007 11:14  |
arsavad
Messages: 2 Registered: November 2007
|
Junior Member |
|
|
Hi Friends
Can you plz help me to solve following 2 scenarios
1.Accoding to a requirement, I have to change the directory of the
commandprompt during the execution of an SQL script
Explanation:-
Suppose I strted my SQL script at D:/..After some scripts were run,
without exiting from SQL prompt, I have to go to
D:/Airline/JetAirways and then continuing execution of SQL scripts from
there
2.I have to accept some parameters for an SQL file from a .BAT script
Explanation:-
Suppose I want to do expdp automatically, for that I want to store the
schema details to par file after accepting
from bat script..Also if possible I would like to have prompt of
schemaname at the DOS prompt
as like in SQLPLUS while using '&&' operator..
|
|
|
|
Re: Changing the current directory while running an SQL script [message #278772 is a reply to message #278718] |
Mon, 05 November 2007 11:39  |
 |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Yes, you can ... but, as far as I can tell, that's not the answer. See an example - I'm connecting from the root (c:\):C:\>sqlplus scott/tiger
SQL> $dir *.sql
Volume in drive C has no label.
Volume Serial Number is B0C4-68EB
Directory of C:\ --> note this!
05.06.2007 21:35 54 test.sql
1 File(s) 54 bytes
0 Dir(s) 22.308.741.120 bytes free
SQL> $cd c:\temp --> changing the directory
SQL> $dir *.sql
Volume in drive C has no label.
Volume Serial Number is B0C4-68EB
Directory of C:\ --> nothing changed (we'd rather see C:\TEMP here)
05.06.2007 21:35 54 test.sql
1 File(s) 54 bytes
0 Dir(s) 22.308.786.176 bytes free
SQL> exit
C:\> --> again, no change here
|
|
|