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: Database Administration >> Spool Command Usage

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: Spool Command Usage
 shantanu  Posted: Mar 05, 2008 04:55:18 PM

 Total Post: 42
 Joined: May, 2007






 Hello Guys

I am trying to execute a couple of sql scripts located in /appl/acpt/...unix file system and trying to use spool to capture result of script in a file at /tmp/result.txt location. I used following syntax :

SQL> spool /tmp/result.txt
SQL> @/whole path of the script ending with .sql

Received an error saying file cannot be opened cannot be spooled something like that. What are possible causes? I executed script being in the script location.


 ramesh
Posted: Mar 05, 2008 11:05:16 PM  

 Total Post: 40
 Joined: Aug, 2007






 

Hi,


Go to the location path and give spool filename.lst or spool filename defaulty it takes filename with .lst and execute the script
after completion of script say spool off. at OS level it looks the file name with .lst check it.






 hjkj
Posted: Mar 06, 2008 08:18:49 AM  

 Total Post: 3
 Joined: Mar, 2008






 
Hi

go to script location

connect to database from that location

and give spool filename(default it will be .lst)

and execute script

and go back and open the file

ex:
cd /home
sqlplus "/as sysdba"
spool file.lst
execute script
spool off
go back to home
open the file.pst

hope u understand well.

 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 Khokhar816
  Mohammed Taj746
  Jayanta Sur479
  positive fanatic418
  Vigyan Kaushik386
  Gitesh Trivedi322
  Gopu Gopi250
  Ramesh Jois245
  neeraj sharma243
  Bishal Khetan207






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