4 Replies Latest reply: Nov 29, 2012 12:48 PM by 977015 RSS

    spool path

    977015
      Hi,

      I've got some troubles with the spool command and specially with the path where the specified file goes.

      I've read on different threads that the file goes in the directory where I launch sqlplus but it's not what happens yet.

      I launch sqlplus in the /xxx/yyy/zzz directory but the spool file goes in /aaa/bbb .

      If somebody knows how to fix it it would be great.


      Best regards.
        • 1. Re: spool path
          sb92075
          974012 wrote:
          Hi,

          I've got some troubles with the spool command and specially with the path where the specified file goes.

          I've read on different threads that the file goes in the directory where I launch sqlplus but it's not what happens yet.

          I launch sqlplus in the /xxx/yyy/zzz directory but the spool file goes in /aaa/bbb .

          If somebody knows how to fix it it would be great.


          Best regards.
          when you specify full pathname; the file goes where you direct it to go; otherwise from present working directory
          • 2. Re: spool path
            EdStevens
            974012 wrote:
            Hi,

            I've got some troubles with the spool command and specially with the path where the specified file goes.

            I've read on different threads that the file goes in the directory where I launch sqlplus but it's not what happens yet.

            I launch sqlplus in the /xxx/yyy/zzz directory but the spool file goes in /aaa/bbb .

            If somebody knows how to fix it it would be great.


            Best regards.
            estevens:dwdev$ pwd
            /home/estevens/work
            
            
            estevens:dwdev$ ll
            total 0
            
            
            estevens:dwdev$ sqlplus /nolog
            
            SQL*Plus: Release 11.2.0.1.0 Production on Thu Nov 29 09:03:55 2012
            
            Copyright (c) 1982, 2009, Oracle.  All rights reserved.
            
            SQL> conn estevens
            Enter password: 
            Connected.
            SQL> spo  ol plus.log
            SQL> select sysdate from dual;
            
            SYSDATE
            ---------
            29-NOV-12
            
            SQL> spool off
            SQL> exit
            Disconnected from Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
            With the Automatic Storage Management option
            
            
            estevens:dwdev$ ls -ltr
            total 4
            -rw-rw-r-- 1 estevens estevens 291 Nov 29 09:04 plus.log
            
            
            estevens:dwdev$ cat plus.log
            SQL> select sysdate from dual;
            
            SYSDATE                                                                         
            ---------                                                                       
            29-NOV-12                                                                       
            
            SQL> spool off
            
            
            estevens:dwdev$ exit
            logout
            Present your evidence showing otherwise.
            • 3. Re: spool path
              moreajays
              Hi,

              Generally default spooling happens to your current location from where you are connect to DB.

              In your case there could have been multiple connections & multiple location changes, you might have lost exact location from where you have initiated the connection

              try to reproduce the problem

              Thanks,
              Ajay more
              http://moreajays.blogspot.com

              Edited by: moreajays on Nov 29, 2012 8:48 PM

              Edited by: moreajays on Nov 29, 2012 8:49 PM
              • 4. Re: spool path
                977015
                thanks to all of you!

                I think the right answer to my problem was the last one.

                Once I deleted the spool file from the wrong directory and launch the SQL once again, the file appeared in the right place.

                I think the "link" to the wrong path stays until the spool file is deleted.


                great thanks once again.