SPOOL file path

How/Where to check the path for SPOOL File in SQL.
I am getting the following error while spooling:
SP2-0606: Cannot create SPOOL file "A.LST"
Pls suggest.

If you SPOOL without specifying a full path it will create the file in the current directory that you started SQL*Plus from.
So if I was in:
C:\Documents and Settings\joe.user\
And logged into SQL*Plus and typed SPOOL it would create a file in the directory specified above.
While you are in SQL*Plus you can check the current working directory by doing the following
Windows: SQL> host cdLinux: SQL> !pwdHTH.

Similar Messages

  • File path problem in background job spool

    Hello ,
    i have probelm in file path of the background job in spool.
    i have selection screen
    Radiobutton : p_local
    parameter: path1.
    Radibutton: p_applicatioserver
    parameter: path2.
    if i keep program in background job, it will alwas take second option.
    Now user selected first option and executed job in abckground. File stored in the spplication server with corect file  path name. (path2)
    But when i go to sm37 entered job name and checked the spool, it gives me the file path name path1. but i need the file path1 in the background spool. my question whether i need to change the file path name in program or whether i have to change the setting
    Regards,
    zub

    First of all, local is not an option in background job; you can only save to the apps server, and your program should take that into consideration by checking for sy-batch = 'X', for example.  You should be checking in your at selection-screen to be sure the user has not chosen local path and file and background job.

  • Can a spool file be sent as an attachment in the decision step?

    Hi,
    I have z program that runs in background and produces a spool file. Normally, I can use tcode SP01 to display this file. At the end of this z program, I call SWW_WI_START_SIMPLE to send a workflow into SAP inbox. I want to know if I somhow can send the spool file along also? I read about attachment and SOFM object but still can't figure out what I need to do yet. Please help.
    Thank you,
    TH

    Hi Th,
    Check this code if helpful.
    FORM pdf_conversion.
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
           EXPORTING
                src_spoolid              = spoolno
                no_dialog                = ' '
           IMPORTING
                pdf_bytecount            = numbytes
                pdf_spoolid              = pdfspoolid
                btc_jobname              = jobname
                btc_jobcount             = jobcount
           TABLES
                pdf                      = pdf
           EXCEPTIONS
                err_no_abap_spooljob     = 1
                err_no_spooljob          = 2
                err_no_permission        = 3
                err_conv_not_possible    = 4
                err_bad_destdevice       = 5
                user_cancelled           = 6
                err_spoolerror           = 7
                err_temseerror           = 8
                err_btcjob_open_failed   = 9
                err_btcjob_submit_failed = 10
                err_btcjob_close_failed  = 11.
    ENDFORM.                    " PDF_CONVERSION
          FORM SPOOL                                                    *
    FORM spool.
      PERFORM display.
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
           EXPORTING
               destination            = 'LOCL'
                immediately            = ' '
                new_list_id            = 'X'
                expiration             = '9'
                in_parameters          = p_pripar
                layout                 = 'X_65_132'
                line_count             = 65
                line_size              = 132
                mode                   = 'DEFVALS'
                no_dialog              = 'X'
           IMPORTING
                out_parameters         = p_pripar
                valid                  = val
           EXCEPTIONS
                archive_info_not_found = 1
                invalid_print_params   = 2
                invalid_archive_params = 3
                OTHERS                 = 4.
      NEW-PAGE PRINT ON NEW-SECTION PARAMETERS p_pripar NO DIALOG.
      PERFORM display.
      NEW-PAGE PRINT OFF.
      CLEAR t_filename_tx.
      CONCATENATE 'c:\temp\' p_mat '.pdf' INTO t_filename_tx.
      CONDENSE t_filename_tx.
      SELECT * FROM tsp01 INTO TABLE t_tsp01
           WHERE rqowner EQ sy-uname.
      SORT t_tsp01  BY rqcretime DESCENDING.
      LOOP AT t_tsp01.
        spoolno = t_tsp01-rqident.
        EXIT.
      ENDLOOP.
      IF sy-subrc EQ 0.
        PERFORM pdf_conversion.
      ENDIF.
    sending that inernal to mail
    FUNCTION z_p_traveler_workflow.
    ""Local interface:
    *"  IMPORTING
    *"     REFERENCE(V_FILE_PATH) LIKE  RLGRAP-FILENAME
    *"     REFERENCE(DOKNR) LIKE  CRVD_A-DOKNR
    *"     REFERENCE(DOKVR) LIKE  CRVD_A-DOKVR
    *"  TABLES
    *"      PDF STRUCTURE  TLINE
    D A T A
      DATA: w_gd_doc_data LIKE sodocchgi1.
    internal table for body content of the email
      DATA: t_message LIKE solisti1 OCCURS 0 WITH HEADER LINE.
    internal table for receivers of email
      DATA: t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE.
    internal table for attachment data
      DATA: t_objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE.
    *internal table for Information about structure of data tables
      DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE.
    internal tables for attachment data
      DATA: t_xi_pdf LIKE tline OCCURS 0  WITH HEADER LINE,
            t_xi_temp LIKE bapiqcmime OCCURS 0  WITH HEADER LINE,
            t_xi_mime(255) TYPE c OCCURS 0  WITH HEADER LINE,
            t_html LIKE solisti1   OCCURS 0  WITH HEADER LINE.
    for splitting of the filepath
      DATA : BEGIN OF t_split OCCURS 0,
                row(50),
             END OF t_split.
      DATA:  w_tab_lines LIKE sy-tabix,
             w_subject TYPE so_obj_des,                " for email header
             w_file_path1 TYPE string.                 "file path
      DATA : w_lines       TYPE i,
             w_temp(500)   TYPE c,
             w_offset      TYPE p,
             w_lineslen(2) TYPE p,
             w_mimelen(2)  TYPE p,
             w_tabix       LIKE sy-tabix.
      DATA : w_len      TYPE i,
             w_index    LIKE sy-index,
             w_doc_type TYPE  so_obj_tp,
             w_filename TYPE  so_obj_des .
    internal table for gettting personal numbers of quality engineers
      DATA: BEGIN OF t_ztptwf2 OCCURS 0,
            pernr LIKE ztptwf2-pernr,        "personal number
            END OF t_ztptwf2.
    internal table for gettting userids of quality engineers
      DATA: BEGIN OF t_pa0105 OCCURS 0,
            usrid LIKE pa0105-usrid,       " user id of the quality engineer
            END OF t_pa0105.
    move file path to w_file_path
      w_file_path1 = v_file_path.
    *assign subject of the email
      w_subject = text-006.                  "Travaler Document to Approve
    refreshing the internal tables
      REFRESH : t_objbin, t_packing_list, t_split.
      CLEAR   : t_objbin, t_packing_list, t_split.
      CLEAR   : t_xi_pdf, t_xi_temp.
      REFRESH : t_xi_pdf, t_xi_temp.
      CLEAR: w_temp, w_offset, t_xi_temp.
    move attachment data to t_xi_pdf[].
      t_xi_pdf[] = pdf[].
    Reformat the line to 255 characters wide
      DESCRIBE TABLE t_xi_pdf   LINES  w_lines.
      DESCRIBE FIELD t_xi_pdf   LENGTH w_lineslen.
      DESCRIBE FIELD t_xi_temp  LENGTH w_mimelen.
      LOOP AT t_xi_pdf.
        w_tabix = sy-tabix.
        MOVE t_xi_pdf TO w_temp+w_offset.
        IF w_tabix = w_lines.
          w_lineslen = strlen( t_xi_pdf ).
        ENDIF.
        w_offset = w_offset + w_lineslen.
        IF w_offset GE w_mimelen.
          CLEAR t_xi_temp.
          t_xi_temp = w_temp(w_mimelen).
          APPEND t_xi_temp.
          SHIFT w_temp BY w_mimelen PLACES.
          w_offset = w_offset - w_mimelen.
        ENDIF.
        IF w_tabix = w_lines.
          IF w_offset GT 0.
            CLEAR t_xi_temp.
            t_xi_temp = w_temp(w_offset).
            APPEND t_xi_temp.
          ENDIF.
        ENDIF.
      ENDLOOP.
    *move data from t_xi_temp to t_xi_mime
      LOOP AT t_xi_temp.
        t_xi_mime(255) = t_xi_temp-line.
        APPEND t_xi_mime.
        CLEAR  t_xi_mime.
      ENDLOOP.
    *move data from t_xi_mime[] to t_html[]
      t_html[] = t_xi_mime[].
    *move data from t_html[] to t_objbin.
      LOOP AT t_html.
        t_objbin-line = t_html-line.
        APPEND t_objbin.
        CLEAR t_objbin.
      ENDLOOP.
    *fill the body of email
      t_message = text-005.                        "Mail with PDF attachment
      APPEND t_message.
      CLEAR t_message.
      t_message = text-004.    "Please double click the attachment to verify
      APPEND t_message.
      CLEAR t_message.
      concatenate 'COPY FOR VIEWING ONLY-NOT TO BE'
              'USED/PRINTED FOR PRODUCTION' into t_message separated by
    space.
      APPEND t_message.
      CLEAR t_message.
      IF NOT doknr IS INITIAL.
        CONCATENATE text-001                     "The Document
                    doknr
                    text-002                     "and Version
                    dokvr
                    text-003 INTO                "is changed
                t_message SEPARATED BY space.
        APPEND t_message.
        CLEAR t_message.
      ENDIF.
      DESCRIBE TABLE t_message LINES w_tab_lines.
      READ     TABLE t_message INDEX w_tab_lines.
      w_gd_doc_data-doc_size = ( w_tab_lines - 1 ) *
                                               255 + STRLEN( t_message ).
      w_gd_doc_data-obj_langu  = sy-langu.
      w_gd_doc_data-obj_name   = 'SENDFILE'.
      w_gd_doc_data-obj_descr  = w_subject.
      w_gd_doc_data-sensitivty = 'O'.
      CLEAR t_packing_list.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 0.
      t_packing_list-body_start = 1.
      t_packing_list-doc_type   = 'RAW'.
      t_packing_list-body_num   = w_tab_lines.
      APPEND t_packing_list.
      IF NOT w_file_path1 IS INITIAL.
        w_len = strlen( w_file_path1 ) - 3.
        w_doc_type = w_file_path1+w_len(3) .
        TRANSLATE w_doc_type TO UPPER CASE .
        SPLIT w_file_path1 AT '\' INTO TABLE t_split .
        DESCRIBE TABLE t_split LINES w_index .
        READ TABLE t_split INDEX w_index .
        w_filename = t_split-row .
        w_len = strlen( w_filename ) - 4.
        w_filename = w_filename(w_len) .
        DESCRIBE TABLE t_objbin LINES w_tab_lines.
        t_packing_list-transf_bin = 'X'.
        t_packing_list-head_start = 1.
        t_packing_list-head_num   = 1.
        t_packing_list-body_start = 1.
        t_packing_list-doc_type   = w_doc_type.
        t_packing_list-body_num   = w_tab_lines.
        t_packing_list-doc_size   = w_tab_lines * 255.
        t_packing_list-obj_descr  = w_filename.
        APPEND t_packing_list.
      ENDIF.
    fill the Receivers
      SELECT * FROM ztptwf2 INTO TABLE t_ztptwf2.
      IF NOT t_ztptwf2[] IS INITIAL.
        SELECT usrid FROM pa0105 INTO TABLE t_pa0105 FOR ALL ENTRIES IN
      t_ztptwf2 WHERE pernr = t_ztptwf2-pernr AND subty = '0001' .
        LOOP AT t_pa0105.
          t_receivers-receiver = t_pa0105-usrid.
          t_receivers-rec_type = 'B'.
          APPEND t_receivers .
          CLEAR t_receivers.
        ENDLOOP.
      ENDIF.
      IF  NOT t_receivers[] IS INITIAL.
    Call the FM to post the message to SAPMAIL
        CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
             EXPORTING
                  document_data              = w_gd_doc_data
                  commit_work                = 'X'
             TABLES
                  packing_list               = t_packing_list
                  contents_txt               = t_message
                  contents_bin               = t_objbin
                  receivers                  = t_receivers
             EXCEPTIONS
                  too_many_receivers         = 1
                  document_not_sent          = 2
                  document_type_not_exist    = 3
                  operation_no_authorization = 4
                  parameter_error            = 5
                  x_error                    = 6
                  enqueue_error              = 7
                  OTHERS                     = 8.
      ENDIF.
      FREE: t_objbin,t_message,t_packing_list,t_receivers.
    i hope this code will solve your problem.
    Sankar

  • How to spool file to where start script file located

    I'm writing a sqlplus script, eg. runMe.sql, which is going to run in customer env, will generate some data files eg. result.csv.
    By specify location such as 'spool /certain/path/on/disk/result.csv', I can spool to any path I want. However, my concern is  below:
    1. We gets many customers and the script might be run under different location.
    2. I don't know where customer would save the script, furthermore, I don't want customer to input location manually every time.
    3. Generally, customer would run the script something like "sqlplus username/password@sid @/certain/path/on/disk/runMe.sql". They don't want to pass any parameter at run time.
    4. I wanna spool file to "/certain/path/on/disk" automatically, as a result, result.csv file would appear under same path with runMe.sql.
    5. I tried "spool ./result.csv" but it navigate to where sqlplus session is running.
    6. Also tried &0 etc, but make no sense.
    Can anyone tell me how to obtain start running script file path in sqlplus script(runMe.sql) ? Just like access command parameters under Linux.
    $0 is the name of the command
    $1 first parameter
    $2 second parameter
    $3 third parameter etc. etc
    $# total number of parameters
    $@ all the parameters will be listed
    Thanks in advance.

    Are you looking for SQLPATH ?
    A good and clear example by Paul @ https://forums.oracle.com/message/3727891
    In this way your customer has to set one environment variable SQLPATH=/location/of/script/file/where/they/put/your/runMe.sql and just say :
    spool %sqlpath%\result.csv
    in your runMe.sql.  So, runMe.sql and result.csv will be on SQLPATH location.
    Regards
    Girish Sharma

  • Convert a SAPScript spooled file to PDF

    I have an urgent request to build a front-end interface to map the parameters to SAP Standard object RFOAVIS_FPAYM. This is the driver program for Remit (Payment) Advice Notes using SAPScript.   I need to create a way to submit RFOAVIS_FPAYM and Return back to the calling program after the Remit Note has been created in the SAP spooler. Then I need to read the spooled file and pass the parameters to the FM CONVERT_OTF_2_PDF to create a PDF version and email the PDF via SAPConnect.
    Has anyone done something similar? I am looking for help in capturing the newly created SAPScript form in the spooler and passing the correct parameters to FM CONVERT_OTF_2_PDF so that I will convert the correct output..

    Take a look at these two Process BTEs, Business Transaction Events.
    00002040 Autom. pmnt transactns: Output of pmnt advice note
    00002050 Autom. pmnt transactns: Output of pmnt advice note
    Look at them from Tcode BF05 .  They can be created from the Customizing Tcode SPRO. 
    The help document for BTEs in Tcode SPRO is really quite good.
    Bruce
    The documentation:
    Business Transaction Events
    This activity describes how you can connect additional components (such as in the form of function modules developed yourself or a product from an external software provider) to the standard R/3 System.
    There are two types of interface available in the General Ledger Accounting (FI-GL), Accounts Receivable and Accounts Payable (FI-AR/FI-AP), and Sales and Distribution (SD) components for this:
    1. Publish & Subscribe interfaces (also called "informing interfaces" in the following)
    These should inform you about particular events (such as a document being entered) in the SAP standard application and make the data generated as a result available to the external software. The external software does not return any data to the standard R/3 System. Examples of such events in the R/3 System are:
    Master record was created, changed, or blocked
    Document was entered, parked, changed, or reversed
    Items were cleared or reset
    Additional processing can be caused in the additional component on the basis of these events and data:
    Starting a workflow
    Generating or changing additional data
    Requesting correspondence
    2. Process interfaces (also referred to as "process" in the following)
    Process interfaces are used to submit business processes to a different control which cannot be realized with the standard system, that is process interfaces replace standard processes.
    Here you can structure determination of individual field contents or of specific reactions to process flows individually. It is possible to connect different external developments to the standard R/3 System. The additional developments are generally carried out using the ABAP/4 Development Workbench.
    This way you can, for example, influence the control of payment transactions. Selection of payment method, house bank and partner bank can be made using the payment data (currency, amount, and payee) according to a selection logic which you have defined.
    Standard settings
    Sample modules are delivered in the standard R/3 System which you can copy into your name range and fill them with statements there.
    Activities
    1. Enter a product using "Settings -> Customer's products". There are generally a large number of function modules belonging to a product which can be called by different program events from within the standard R/3 System. A product can also be an external software component.
    If the product is in an external system, enter an RFC destination here. If the product is in the same system, you do not have to enter anything.
    Important: Do not forget to activate the product after making the following settings.
    2. Establish the interfaces with which the R/3 System provides you.
    To do this, choose Environment -> Info system (P/S) or Environment -> Info system (Processes).
    Execute the program. You should enter "A" as the attribute type. You see the respective interfaces with which the R/3 System provides you. Note the key of the interface which you require.
    You can also select:
    By particular SAP application components
    By particular events by entering intervals
    Which interfaces are used in activated products
    Which interfaces are used within a particular country version or within a particular industry
    Which interfaces are used within a particular customer product
    3. Enter the function module which you have developed yourself. To do this, choose either Goto -> Edit modules within the info system or Settings -> P/S modules or Process modules -> Customer's in the "SAP Business Framework" menu.
    Make the following entries:
    Key for the interface
    The product that you want to use
    Function module which belongs to this product.
    You can also enter several function modules for a product.
    Caution: The function module must be within your name range, that is must begin with the letter Z.
    You leave the Ctr and Appl. fields blank unless you want a particular country version or a particular SAP industry-specific component to be enhanced or replaced instead of the standard process flow.
    4. Fill the source text of your function module and activate it.
    To do this, go again via Environment -> Info system (P/S) or Environment -> Info system (Processes) into the information system and execute the program. Then proceed as follows:
    Click twice on the interface you have chosen. If you want, you can look at the interface at this point by choosing Goto -> Interface. Then choose the Back function again afterwards.
    Place the cursor on the relevant line and choose Goto -> Function library. You see the sample function module delivered by SAP.
    Copy the sample module delivered by SAP and call it the same as the function module entered in step 3.
    Fill the source text of the empty function module.
    Activate the function module.
    Activate the product as described in step 1.
    5. Run the R/3 program affected and test whether calling your function module works.
    Further notes
    The other menu paths are only used for information about additional components delivered by SAP or about software already installed by external software providers.

  • Schedule a ABAP query from SQ01 to transfer the output to a file path

    I am trying to schedule an ABAP query to run every night and transmit the output as a .TXT file to a particular file path on a server. In the "output format" of the selection screen I selected the second last radio button "File store" and entered the full path and file name.
    When I run this in foreground I get a pop up window confirming the file path before it is downloaded. I have to just hit enter. But when I run in background the file gets transmitted to the spool and not to the file path entered in "File Store".
    Is there any way I can make the file go to the specified path instead of the spool?
    Any help will be appreciated

    See documentation for enhancement SQUE0001. Go to SMOD, enter SQUE0001, and choose documentation.
    I had the same requirement, and I used enhancement SQUE0001 to create a screen exit that adds the selection, "private file". I then created a variant for my query with the private file button selected and the path included, and set up a batch job to run my query with my variant every night.
    Hope that helps.

  • Save Spool File to Local PC

    Hi there,
    We have run our P60 program which has created a spool file which can be seen
    in SP01 as a PDF file.
    When I go into the menu SPOOL REQUEST => Forward => the save as local file is greyed out :
    I need to download this file to my local PC.
    Does anybody know how to do this.
    Thanks
    Andy

    Hello,
    It is a very simple process.
    Go to SP01, and select the spool number which you want to save as PDF.
    Follow the below path:
    Goto-->Display Requests-->Content
    this will show the content which is to be printed using this spool number.
    Then type PDF! ( exclamation mark) which will give a pop up like screen to you. This is actually a PDF preview.
    Navigate your mouse toward the below part of the screen and a save button will come. You can now save the file.
    Regards,
    Hrishav

  • Error SP2-0333: Illegal Spool File Name: (bad character: ' ')

    Below is my spool file logic just to test outputting to a spool file with a date in the spool file. The date part works fine. I can see the date coming out in the error message. It doesn't like the spaces, but I am not in control of the folder names. Any ideas? I have tried putting single and double quotes around it to no avail. I also tried using the concatenation operator || to separate the path from the filename and that didn't work, either.
    col sdate new_value sysdt
    select to_char(sysdate,'YYYY-MM-DD') sdate from dual;
    SPOOL \\Nsgnvl_files\rco\Linecost Audit\General NA Info\CLLI_Code_Discrepancy_Reports\&sysdt.SendToLCAnotInRepository.txt
    SELECT TO_CHAR(sysdate) from dual;
    spool off

    Example :
    SQL> set escape |
    SQL> spool "c:\test| dir\foo"
    SQL> select sysdate from dual;
    SYSDATE
    2007-09-27 16:31:30
    SQL> spool off
    SQL> exit
    Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Prod
    ction
    C:\>cd test dir
    C:\test dir>type foo.lst
    SQL> select sysdate from dual;
    SYSDATE
    2007-09-27 16:31:30
    SQL> spool off
    C:\test dir>Message was edited by:
    Paul M.
    but I am not in control of the folder namesSorry, I didn't read carefully.....

  • Reg spool file attachment in Email

    Hi All,
    I am sending the report output to spool and I need to take this spool file and I have to send as a attachment through Email.Could some body let me know how we will do this one thing is the report program runs in back ground (because of this we can not get the spool file to the presentation server).
    Thanks&Regards
    jagan

    Please refer :
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8cd6adbb-0301-0010-39ba-938c601d5db9
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/smartformtoMailasPDF+attachment&
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/savingPDFfilefromspooling+list&
    Regards,
    Anish Thomas
    <b>Pls reward useful answers</b>

  • /sapmnt/SID/GLobal SPOOL Files

    Hi
    We are using Adboe forms and when spool request generate for the Form, there are three files generating on the OS Level @ /sapmnt/SID/global directory. The three files as follows.
    SPOOL0000014229_00001.xfd
    SPOOL0000014229_00001.pcl
    SPOOL0000014229_00001.cfg
    We have hundresds of PDFs getting generated everyday and its filling up the FILE system at OS level. These files are deleted when we delete the spool request from SP01.We would like to know if there is any process where we can delete the files from he OS level or can we change in the program tp change path of the files to store in diffrent location.
    Regards,
    Mahesh Shetty

    if there is any process where we can delete the files from he OS level !!
    You can use the cron utility (unix) at OS level to delete files from the @ /sapmnt/SID/global directory
    .For eg  : To delete files older than 2 days schedule the below command through cron to run daily .
    find /sapmnt/SID/global/ -mtime +2 -type f -exec rm {} \;  (Be careful )
    or from SAP level schedule the report  RSPO1041 daily to delete spool files.Thanks
    Other wise ,if you are using a particular output device to generate the spool you can do the following for the device in transaction SPAD
    SPAD -> Change output device -> Edit -> Data storage. and choose storage as database.
    Regards
    Amit

  • RMAN spool file empty after the run

    DB Version: 10gR2
    OS : SunOs 5.10
    In CATALOG mode, i run scripts in OS path like below
    connect target sys/oracle123 catalog rman/secretpass@rmancat @'/path_in_targetdb_machine/bkp.rcv'bkp.rc looks like below. The backup runs fine and the spool file gets created. But the spool file is empty ! Any idea why?
    spool log to /home/oracle/spool.log
    run{
    crosscheck backup;
    crosscheck archivelog all;
    crosscheck copy;
    crosscheck backup of database;
    crosscheck backup of controlfile;
    delete expired backup;
    delete noprompt expired archivelog all;
    delete noprompt obsolete device type disk;
    run {
    recover copy of database with tag "INCR_BKP";
         backup check logical incremental level 1 format '/bkp_dir/INCR_%d_%u' for recover of copy with tag "INCR_BKP" database;
         backup (archivelog all  format='/bkp_dir/arch_logs/ARCH_%d_%T_%u_s%s_p%p' DELETE ALL INPUT TAG "arch_logs");
         backup format '/bkp_dir/ctrl_file/RMAN_CTL_%s:%t:%p.bkp' current controlfile;
    spool log off;
    exit;

    Hello,
    If you intend to get the logs of the RMAN statement execution, you may instead use the option LOG when you launch RMAN. For instance,
    rman @<rman_script>.rcv LOG <rman_log>.logHope this help.
    Best regards,
    Jean-Valentin

  • Can't create spool file

    Hi,
    I've problems in creating spool file. I've some PL-SQL scripts, running monthly with sqlplus on Windows 2000, that have always generated spool file using the statements "spool filename.log".
    Two days ago, I run this scripts and I noticed that they didn't create the log file, but nothing has been changed.
    I noticed that changing the script with "spool c:\filename.log" the spool file is correctly generated.
    I run the script using sqlplus user/pwd@db @c:\script.sql and in the body of the script there is:
    whenever oserror exit SQL.OSCODE rollback
    whenever sqlerror exit SQL.SQLCODE rollback
    spool faXXXXX_X.log
    Set autocommit off timing on echo on feedback on termout on serveroutput on
    set escape ^
    DECLARE
    Why "spool filename.log" suddenly stop to work? There is some enviroment variable who determine the default directory of spooled file?

    My PATH variable has a lot of directories, some of them are "C:\oracle\ora81\bin;C:\Program Files\Oracle\jre\1.1.7\bin;C:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\orant\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;"
    I make a "search" for the spooled file in all the directories of the hard disk; the problem is that the spooled file has not been created but the SQL script terminated succesfully. What's the possible reason?

  • How to configure spool file location

    Hi all,
    I want to configure a default spool file location, so whenever I use spool in my SQL script, the file will be saved in this location. Please help me on how to configure it.
    Thanks in advance

    The spool file ends up in the path you specify, or in the working directory (where you start sqlplus), like this:
    C:\>
    C:\>cd %my_spool_dir%
    C:\oracle\admin>sqlplus ...
    sql> spool test
    Or you could just use your own standard spool.sql script as zetabouy suggests!

  • Spool file location

    I have a shell script that calls 20 SQL scripts. Each SQL script spools the output to a file. I haven't given any path for the spool files but only gave names to the spool files.
    I open a SQL session from within the shell script and run the 20 SQL scripts. To which directory will the 20 spool files be sent from the shell script?

    To current directory from which you have started sqlplus:
    C:\Documents and Settings\mob>sqlplus "/ as sysdba"
    SQL*Plus: Release 11.1.0.6.0 - Production on Tue Jun 30 03:14:13 2009
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the Partitioning, Oracle Label Security, OLAP, Data Mining,
    Oracle Database Vault and Real Application Testing options
    SQL> spool test.txt
    SQL> select count(*) from all_objects;
      COUNT(*)
         68436
    SQL> spool off
    SQL> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the Partitioning, Oracle Label Security, OLAP, Data Mining,
    Oracle Database Vault and Real Application Testing options
    C:\Documents and Settings\mob>more test.txt
    SQL> select count(*) from all_objects;
      COUNT(*)
         68436
    SQL> spool offWith kind regards
    Krystian Zieja

  • Search c:\ drive and return file path for winword.exe and save as variable

    Hi all, here is what I'm trying to do;
    1. Search C:\ drive for winword.exe
    2. take the file path and save it as a variable.
    3. Then based on the path value, use the switch statement to run "some command" 
    Essentially I'm trying to find what the file path for winword.exe is, then run a command to modify the registry.  I already have the script that will modify the registry like I want but the problem it, the path is hard coded in the script, I want to
    now look for all versions of word and set the right file path so I can make the right registry changes.

    This should get you started:
    http://ss64.com/ps/get-childitem.html
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

Maybe you are looking for

  • Error occurs while posting the transaction by user in F-02

    Dear Friends, Kindly give me acceptable solution to the below error/ticket while user posting a transaction in F-02. ERROR: " system error in routine FI_TAX_CHK_PRICING_DATA_ error code 13 function builder TAX2"

  • Java 1.4 under Redhat 7.2

    Dear all, I got the following message after I installed and tried to run java under RH7.2 Error occurred during initialization of VM Unable to load native library: /usr/java/j2sdk1.4.0/jre/lib/i386/libjava.so:symbol __libc_waitpid, version GLIBC_2.0

  • Advice for a newbie please: form for a copy centre

    I work in a copy centre, currently we work in a very manual manner. I would like to  create an online form where people can submit copy requests. It would just have simple info like paper size, number of copies etc if it were a print job they could a

  • Eeek! Help! Aperture will not start

    When I try to start up Aperture from the Dock the icon gives a bounce but nothing happens. This is what the console log tells me is happening, but I'm not experienced enough to know what to do about it. I would be extremely grateful for any advice. T

  • Unknown service: errors ?!

    Hello, i am still getting Unknown service errors using JDeveloper 3.2.2 and Oracle 8.1.7, InfoBus java client. Here is a simple checklist: 1) sess_sh - connection OK 2) Connection manager in JDeveloper - OK 3) deployed Application Module as EJB Sessi