Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: SQL*Plus and PL/SQL >> Changing the current directory while running an SQL script

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: Changing the current directory while running an SQL script
 arsavad  Posted: Nov 03, 2007 04:04:34 AM

 Total Post: 5
 Joined: May, 2007






 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..

 Mohammed Taj
Posted: Nov 03, 2007 11:19:51 AM  

 Total Post: 746
 Joined: Jul, 2007






 
As for first question you can use in sql script like "SQL> host c:"
and for second question --> I didn't understand.

 arsavad
Posted: Nov 06, 2007 04:54:57 AM  

 Total Post: 5
 Joined: May, 2007






 
The HOST command will not change the current directory of the sqlplus..I tried it and not working

 KS
Posted: Dec 03, 2007 07:06:23 AM  

 Total Post: 65
 Joined: Nov, 2006






 
Hi,
One suggestion for ur first question:

For ex :
Sqlplus is started from D:\

Now u want to run the script in D:\scripts\test.sql

For this u can use the full path "D:\scripts\test.sql" , without changing to the particular directory.

I hope this helps u.

 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar857
  Mohammed Taj746
  positive fanatic483
  Jayanta Sur479
  Vigyan Kaushik387
  Vinoth Kumar379
  Gopu Gopi350
  Gitesh Trivedi322
  neeraj sharma258
  Ramesh Jois246






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software