Spooling issues in SQLPlus

Hi all,
I have a PL/SQL script which I run, which spits out information using the dbms_output.put_line function. I also use some substitution parameters like w2 number:=&wq;
Now when I run my proc in SQLplus I get a prompt to enter values.
for ex: Enter value for wq: 100000
Now when I spool my contents to a file, I get the output from the dbms_output.put_line as well as the above prompt information.
I am looking to spool only the information I print using dbms_output.put_line and not the other pieces of information like :
Enter value for wq: 100000
old 3: w2 number:=&wq;
new 3: w2 number:=100000;
How do I execute that? Are there are any SQLPlus options to disable message spooling.
thx.

Use the accept command of SQL*Plus to accept the values before you do a spool command so as to accept the values and avoid being prompted for values after you do spool command.
http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12005.htm#sthref1777
http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14357/ch5.htm#CACHDBHG

Similar Messages

  • Report - Spool Issue

    Hi Experts,
    I am working on a Report. When I run Report  at background,Once the Job gets over two spool lists are generated.
    Its like one pool is original and other is like Duplicate one, but the Output remains the same except the one wich has date inthe HEADER of the spool list and other without that date in the other spool list.
    Please help me on this issue.
    Regards,
    Vishwa

    Harish,
    Actually some restriction are made in the Basic level, so that I cant change the Batch system field at foreground and test in Dialog process.
    Regards,
    Vishwa

  • Printer spool issue with HP LaserJet 1018

    I seem to be having a recurring problem with the HP LaserJet 1018 that I am hoping someone has also had and can help me resolve.  When I go to print I get a message that I need to set up a printer (it does not recognize the printer is there).  When I click on set up a new printer, I receive a message that the local print spooler service is not running.  Nothing I do seems to solve the problem. 
    This happened to me with my previous 1018 printer.  The exact same thing.  I had a second 1018 available to me that I connected and it worked just fine for about two months and now is doing the same thing as the first.  
    I have an HP Pavilion Entertainment PC with Windows 7 (64 bit) operating system.  I previously had a Dell with Windows XP that the first printer worked on for a long time (maybe 2+ years).  I got this new computer within the past six months and both these printers stopped working while on this computer.
    Any help or ideas would be appreciated. 

    Welcome to the HP Forums  fastndfury,
    I see by your post that you are only getting the error on the Windows 8 computer, "The scanner is currently in use. Please wait until your previous task is completed and then try scanning again." I can help you with this issue.
    I have provided a document to go through the steps to see if it will help resolve this issue.
    'Another program has control of the scanner' Message Displays on the Computer When Scanning.
    If you need further assistance, let me know.
    Have a nice day!
    Thank You.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

  • Timing Issue - Running sqlplus for each script in a list of scripts

    I have a large number of folders with sql scripts that I need to run from windows with sqlplus. The problem is the scripts must be run in order. When I loop through the scripts and run sqlplus for each one, they sometimes fail because things in the prior script are not yet available.
    So I added a jdbc client that checks a table for when the data is available from the prior sqlplus script. It says yes the data is visible in the table so the script can launch the next SQLPlus process but it fails unless I put a 2 second sleep in.
    Because sqlplus doesn't have a "CD" command and there are limitations with SQL_PATH and relative imported child scripts, I'm afraid I'm stuck with running multiple sqlplus sessions.

    I should clarify that I'm looking for a way to run scripts in sequence with sqlplus. There is an issue where one sqlplus session commits and exits and the next starts but the commit is not yet available to the new sqlplus session. To me this is a bug with sqlplus but maybe someone can explain how this is a "feature".

  • A question about the SPOOL command in sqlplus

    Dear all,
    I have a question about the SPOOL Command and I would appreciate if you could kindly give me a hand. Consider the following sql script.
    SPOOL result.txt
    SELECT * FROM mytable;
    SPOOL OFF;This works pretty well, and the whole content of the table "mytable" is exported to the text file "result.txt". However, sqlplus prints also the number of lines
    printed after each query. As a result, after running this script, at the end of the file, I have always a line like
    "20541 lines returned"How can I avoid this line (the number of returned lines) in my result file?
    Thanks in advance,
    Dariyoosh

    Peter Gjelstrup wrote:
    Hi Dariyoosh,
    As you are about to find out, SQL*Plus is a really powerful tool once the wonders of it are discovered.
    You really should study the reference
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10823/toc.htm
    In your current case especially the SET command
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10823/ch_twelve040.htm#BACGAJIC
    Regards
    PeterHello there,
    Thank you very much for your attention to my problem and in particular the interesting links.
    Kind Regards,
    Dariyoosh

  • Local printer management --Spooler Issues--

    Trouble: of the 3 production printers on a local machine 1 to many of the printers may have a Job get stuck in printing for some unknown issue. Clicking cancel job / Delete fails to remove the Job from the List. At this point i am forced to Kill the Print
    Spooler and restart it.
    Want to have From Wscript.Shell or VBS: for each printer with a Que Count >1 Find the First JobId with a bad status delete this and Copy the remainder of the PrintQue content to a Local "Temp" location use a CancelAllJobs() method, then Replace
    all the Content back into the printer Spooler for re-issue.
    Thoughts?
    Thanks

    I would investigate the root cause of why certain print jobs cause a problem.
    Bill

  • Paging in SPOOL Issue!

    Hi,
    I don't want to make any paging in the spool file but I am always getting a new page after ~65 lines, below my setting:
    set verify off
    set linesize 3000
    set pagesize 6000000
    set trimspool on
    spool /m/home/omc/aa.txt
    select * from KPI order by PST;
    spool off
    It's under HP-UNIX with Oracle 9i, is there any idea about this issue?
    Notice that I did the same under my machine (Windows + Oracle 10g) and everything goes fine (no paging was in the output spool file)!
    Thanks in advance

    OK, I am entering invalid "pagesize" number. But is there a way that I could disable paging in the output spool file; cause the output of the spool file might be more than 50000 row. I tried to set the "pagesize" to zero, OK it will disable the paging but it's also disable the column heading.
    Is there a workaround solution?
    Thanks...

  • Print Spooler Issue

    I recently became unable to print.  My printer is installed and drivers updated, but I get an error when I try to print that tells me my Print Spooler Service is not running, and I cannot start it.
    Windows 7 Home Edition 64bit
    HP Touchsmart 310PC
    Error Popup:
    +++++++++++++++++++++++
    Windows could not start the Print Spooler service on local computer.
    Error 1053: This service did not respond to the start or control request in a timely fashion.
    +++++++++++++++++++++++
    Running diagnostics/troubleshooting does not resolve this issue.
    When trying to print from some applications I get an error that says "No Default Printer Found.  Please choose a printer a try again".  I cannot choose another printer because of the spooler error.
    Any suggestions?

    rjscheper1,
    This should fix it, look here
    I am a volunteer. I am not an HP employee.
    To say THANK YOU, press the "thumbs up symbol" to render a KUDO. Please click Accept as Solution, if your problem is solved. You can render both Solution and KUDO.
    The Law of Effect states that positive reinforcement increases the probability of a behavior being repeated. (B.F.Skinner). You toss me KUDO and/or Solution, and I perform better.
    (2) HP DV7t i7 3160QM 2.3Ghz 8GB
    HP m9200t E8400,Win7 Pro 32 bit. 4GB RAM, ASUS 550Ti 2GB, Rosewill 630W. 1T HD SATA 3Gb/s
    Custom Asus P8P67, I7-2600k, 16GB RAM, WIN7 Pro 64bit, EVGA GTX660 2GB, 750W OCZ, 1T HD SATA 6Gb/s
    Custom Asus P8Z77, I7-3770k, 16GB RAM, WIN7 Pro 64bit, EVGA GTX670 2GB, 750W OCZ, 1T HD SATA 6Gb/s
    Both Customs use Rosewill Blackhawk case.
    Printer -- HP OfficeJet Pro 8600 Plus

  • Regarding Spool issue while running in background

    Hi All ,
    i am getting some issue i am executing one report in background so the report output of the spool format is disturbed but while i am executing same report in foreground everything is printing perfectly.
    So please suggest me where i missed the scenarios.
    Thanks,
    Venkata Pradeep.

    Have you tried to set the format properties?
    Execute in Background->Properties Button->Format.
    Regards.

  • Issue of Sqlplus

    Hi,
    Before this, everything is fine for my Oracle express 11g inside my OL5.8.
    Now I get this
    oracle@localhost:~$ sqlplus /nolog
    bash: sqlplus: command not found
    using oracle user in my OL 5.8. why?

    Thanks. See this
    oracle@localhost:~$ env | sort
    COLORTERM=gnome-terminal
    CVS_RSH=ssh
    DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-1EhQ6dGR9B,guid=49edf9c60b91703ddb5827005164dd4b
    DESKTOP_SESSION=default
    DESKTOP_STARTUP_ID=
    DISPLAY=:0.0
    G_BROKEN_FILENAMES=1
    GDMSESSION=default
    GDM_XSERVER_LOCATION=local
    GNOME_DESKTOP_SESSION_ID=Default
    GNOME_KEYRING_SOCKET=/tmp/keyring-L8DvEv/socket
    GTK_IM_MODULE=scim-bridge
    GTK_RC_FILES=/etc/gtk/gtkrc:/u01/app/oracle/.gtkrc-1.2-gnome2
    HISTSIZE=1000
    HOME=/u01/app/oracle
    HOSTNAME=localhost.localdomain
    INPUTRC=/etc/inputrc
    LANG=en_US.UTF-8
    LESSOPEN=|/usr/bin/lesspipe.sh %s
    LOGNAME=oracle
    LS_COLORS=
    MAIL=/var/spool/mail/oracle
    PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin
    PS1=\[\033]0;\u@\h:\w\007\]\u@\h:\w\$
    PWD=/u01/app/oracle
    QT_IM_MODULE=scim
    SESSION_MANAGER=local/localhost.localdomain:/tmp/.ICE-unix/3295
    SHELL=/bin/bash
    SHLVL=2
    SSH_AGENT_PID=3349
    SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
    SSH_AUTH_SOCK=/tmp/ssh-xVXCID3295/agent.3295
    TERM=xterm
    USERNAME=oracle
    USER=oracle
    _=/usr/bin/env
    WINDOWID=27263058
    XAUTHORITY=/tmp/.gdmW54NVW
    XMODIFIERS=@im=SCIM

  • Printing Purchase Orders in SRM (spool issues, etc.)

    Hi SRM Gurus,
    Could anyone tell me exactly how the printing of PO's works in SRM? What is the step by step description from PO approval to getting the prinout?
    From my understanding, as long as you've configured everything stated from SAP Note 564826 (assign printer LOCL to pgrp, schdule background job RSPPFPROCESS, etc) when you go to transaction "Issue Purchase Orders" and click on the print button...the output will be processed by the background job that we scheduled.
    The problem is that, in the spool request, there are two (2) spool numbers created which I don't understand. One is described as OTF_SPOOL and has the title COMP LOCL SAPMSSY1. This always has the status "Completed" and highlighted as green.
    The other is an unprocessed spool request described as SCRIPT LOCL SAPMSSY1 I dont know what the difference of these two are, but either way...there was no actual printout.
    Is there something I need to know about the background job? It seems the answer is there...
    Regards,
    Marvin

    Access method U (berkeley protocol) would require a printer server which we do not want.
    We defined a new device, LOCM that has the procedure M (email to receiver/owner). Ideally, this would send an email with a PDF copy of the purchase order. However, in the spool request the receiver is ALWAYS defined as WF-BATCH. Even if the PO creator is a different user ID, the receiver would be user WF-BATCH still.
    Does anyone have an idea how to remove the receiver part in the spool request attributes? Or simply replace that with the owner of the spool?

  • Spooling issue

    I have a sql to spool records.But when I execute this the spool file test.log is having a size of 1k even though
    It doesnt contain any records .I want the size of log to be 0 k if no records in it.Any set option can I use to overcome this??
    set pagesize 0;
    set linesize 100;
    set colsep '';
    set feedback off;
    set term off;
    spool tes.log;
    select distinct aa.user_id, letter_doc_name from temp_mc_letters aa,
    (select distinct user_id, decode(user_id2, null,'not found','99', 'not found','found') found_status
    from temp_mc_letters ) a,
    (select user_id from
      (select distinct user_id, decode(user_id2, null,'not found','99', 'not found','found') found_status
    from temp_mc_letters)
    group by user_id
    having count(9)=1
    )                       b
    where aa.user_id=a.user_id
      and aa.user_id=b.user_id
      and a.found_status='not found';
    spool off;-Hena

    It will work if you run it inside a script:
    C:\TEMP>dir
    Volume in drive C has no label.
    Volume Serial Number is 2450-CE06
    Directory of C:\TEMP
    05/04/2010  03:43 PM    <DIR>          .
    05/04/2010  03:43 PM    <DIR>          ..
    05/04/2010  03:42 PM               187 test.sql
                   1 File(s)            187 bytes
                   2 Dir(s)  103,568,400,384 bytes free
    C:\TEMP>type test.sql
    set pagesize 0;
    set linesize 100;
    set colsep '';
    set feedback off;
    set term off;
    spool test.log;
    select * from scott.emp e, scott.dept d where e.deptno = d.deptno;
    spool off
    C:\TEMP>
    C:\TEMP>
    C:\TEMP>
    C:\TEMP>sqlplus scott/tiger
    SQL*Plus: Release 10.2.0.4.0 - Production on Tue May 4 15:44:24 2010
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    scott@PTS>@test.sql
    scott@PTS>host dir test.log
    Volume in drive C has no label.
    Volume Serial Number is 2450-CE06
    Directory of C:\TEMP
    05/04/2010  03:44 PM             1,762 test.log   <--  actually contains data
                   1 File(s)          1,762 bytes
                   0 Dir(s)  103,568,330,752 bytes free
    scott@PTS>host vi test.sql
    scott@PTS>host type test.sql
    set pagesize 0;
    set linesize 100;
    set colsep '';
    set feedback off;
    set term off;
    spool test.log;
    select * from scott.emp e, scott.dept d where e.deptno = d.deptno and 1=2; -- so it doesn't return data
    spool off
    scott@PTS>@test.sql
    scott@PTS>host dir test.log
    Volume in drive C has no label.
    Volume Serial Number is 2450-CE06
    Directory of C:\TEMP
    05/04/2010  03:48 PM                 0 test.log
                   1 File(s)              0 bytes
                   0 Dir(s)  103,568,089,088 bytes free

  • Print spooler issues with windows 8

    printer stopped when i switched to windows 8.
    error message telling me print spooler is not functioning
    unable to get it to function...every probram indicates that printer is working properly, yet it shows that I have no printer installed and my printer cannot be found or activated no matter what I do.
    Joseph J Grech

    Hi,
    If updating the printer driver cannot fix the issue, please also try the following steps:
    Clear Printer Spooler Files and Enable the Spooler Service
    =================================
    1. Run "Services.msc" (without the quotation marks).
    2. Double-click "Printer Spooler" in the Services list.
    3. Click Stop and click OK.
    4. Navigate to "%WINDIR%\system32\spool\printers", delete all files in this folder.
    5. Run "Services.msc" (without the quotation marks).
    6. Double-click "Printer Spooler" in the Services list.
    7. Click on Start. In the Startup Type list, make sure that "Automatic" is selected and click OK.
    Regards,
    Arthur Li
    TechNet Community Support

  • LaserJet CM1312 MSP series spooler issues on Windows XP/BootCamp on MBP

    In a mixed environment:
    Mac G5 connected by ethernet to router,
    MacBook Pro wireless connection to router and
    Windows XP PC tower connected by ethernet to router,
    the CM1312 connected by ethernet to router prints fine except for:
    the MMPro (while in BootCamp) and the PC running Windows XP where there are spooling errors and printing fails.
    I need to better understand the issue and find a solution asap.

    Did you install the right device driver for your hardware???
    http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en &cc=us&prodTypeId=18972&prodSeriesId=3558902&prodNameId=3558903&swEnvOID=228&swL ang=8&mode=2&taskId=135&swItem=ma-60887-3

  • Smartform Spool issue - Not pulling all pages

    Hi,
    I am expecting aorund 2000 pages of spool file with a smartform driver program.
    My spooljob is limiting me to only 33 pages and job is still active  when i check using SM37.
    Anything related to spooling is wrong in my code?
    SORT T_ITEM BY FKDAT.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          FORMNAME           = P_FORM
        IMPORTING
          FM_NAME            = FM_NAME
        EXCEPTIONS
          NO_FORM            = 1
          NO_FUNCTION_MODULE = 2
          OTHERS             = 3.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      LS_COMPOSER_PARAM-TDNEWID = 'X'.
      LS_CONTROL_PARAM-PREVIEW = ''.
      SORT T_HEADER BY NAME1 KUNNR.
      DATA: V_PREV_CUR LIKE BSID-WAERS.
      LOOP AT T_HEADER INTO WA_HEADER.
        REFRESH: ITEM_ITAB, ITEM_ITAB_TMP.
        CLEAR: V_PREV_CUR.
        LOOP AT T_ITEM WHERE KUNRG = WA_HEADER-KUNNR.
          MOVE-CORRESPONDING T_ITEM TO ITEM_ITAB.
          APPEND ITEM_ITAB.
        ENDLOOP.
        SORT ITEM_ITAB BY WAERS.
        LOOP AT ITEM_ITAB.
          IF SY-TABIX <> 1.
            IF V_PREV_CUR <> ITEM_ITAB-WAERS.
              SORT ITEM_ITAB_TMP BY FKDAT.
              CALL FUNCTION FM_NAME
                EXPORTING
                  ARCHIVE_INDEX        = TOA_DARA
                  ARCHIVE_INDEX_TAB    = ARC_IND_TAB
                  ARCHIVE_PARAMETERS   = ARC_PARAMS
                  CONTROL_PARAMETERS   = LS_CONTROL_PARAM
                  MAIL_APPL_OBJ        = LS_RECIPIENT
                  MAIL_RECIPIENT       = LS_RECIPIENT
                  MAIL_SENDER          = LS_SENDER
                  OUTPUT_OPTIONS       = LS_COMPOSER_PARAM
                  USER_SETTINGS        = SPACE
                  WA_ITAB              = WA_HEADER
                IMPORTING
                  DOCUMENT_OUTPUT_INFO = DOCUMENT_OUTPUT_INFO
                  JOB_OUTPUT_INFO      = JOB_OUTPUT_INFO
                  JOB_OUTPUT_OPTIONS   = JOB_OUTPUT_OPTIONS
                TABLES
                  WA_DEP               = ITEM_ITAB_TMP
                EXCEPTIONS
                  FORMATTING_ERROR     = 1
                  INTERNAL_ERROR       = 2
                  SEND_ERROR           = 3
                  USER_CANCELED        = 4.
              IF SY-SUBRC <> 0.
                WRITE: / 'ERROR in passing variables to the smartforms '.
              ENDIF.
              LS_COMPOSER_PARAM-TDNEWID = SPACE.
              LS_CONTROL_PARAM-NO_DIALOG = 'X'.
              LS_CONTROL_PARAM-PREVIEW = ''.
              REFRESH ITEM_ITAB_TMP.
              MOVE-CORRESPONDING ITEM_ITAB TO ITEM_ITAB_TMP.
              APPEND ITEM_ITAB_TMP.
            ELSE.
              MOVE-CORRESPONDING ITEM_ITAB TO ITEM_ITAB_TMP.
              APPEND ITEM_ITAB_TMP.
            ENDIF.
          ELSE.
            REFRESH ITEM_ITAB_TMP.
            MOVE-CORRESPONDING ITEM_ITAB TO ITEM_ITAB_TMP.
            APPEND ITEM_ITAB_TMP.
          ENDIF.
          AT LAST.
            CALL FUNCTION FM_NAME
              EXPORTING
                ARCHIVE_INDEX        = TOA_DARA
                ARCHIVE_INDEX_TAB    = ARC_IND_TAB
                ARCHIVE_PARAMETERS   = ARC_PARAMS
                CONTROL_PARAMETERS   = LS_CONTROL_PARAM
                MAIL_APPL_OBJ        = LS_RECIPIENT
                MAIL_RECIPIENT       = LS_RECIPIENT
                MAIL_SENDER          = LS_SENDER
                OUTPUT_OPTIONS       = LS_COMPOSER_PARAM
                USER_SETTINGS        = SPACE
                WA_ITAB              = WA_HEADER
              IMPORTING
                DOCUMENT_OUTPUT_INFO = DOCUMENT_OUTPUT_INFO
                JOB_OUTPUT_INFO      = JOB_OUTPUT_INFO
                JOB_OUTPUT_OPTIONS   = JOB_OUTPUT_OPTIONS
              TABLES
                WA_DEP               = ITEM_ITAB_TMP
              EXCEPTIONS
                FORMATTING_ERROR     = 1
                INTERNAL_ERROR       = 2
                SEND_ERROR           = 3
                USER_CANCELED        = 4.
            IF SY-SUBRC <> 0.
              WRITE: / 'ERROR in passing vars to the smartforms '.
            ENDIF.
            LS_COMPOSER_PARAM-TDNEWID = SPACE.
            LS_CONTROL_PARAM-NO_DIALOG = 'X'.
            LS_CONTROL_PARAM-PREVIEW = ''.
          ENDAT.
          V_PREV_CUR = ITEM_ITAB-WAERS.
        ENDLOOP.
      ENDLOOP.

    Hi Vara,
    By default there will be a value set by the administrator for the number of pages you can view in the spool. So to me it looks like this value is set to 33 in yoru case. You can go to setting from the same screen and change thsi setting to display all pages. But beware that this may take a long time some times and also give you a dump at times.
    -Guru

Maybe you are looking for

  • No two finger swipe for navigating files in Lion?

    I use the track pad and just updated to Lion - which has some great features. But I while I can two finger swipe on Safari pages to go back and forth, I don't seem to be able to do that now when going through my files in Finder.... Am I missing somet

  • Live Office error 02010

    I'm building an Xcelisus dashboard using Live Office to access a Crystal Report as the data source, which in turn uses an SAP BW query to retrieve the data. All has been working fine for many weeks, but suddenly I can no longer access a Crystal Repor

  • Web shop LWC Chat and Interaction Center integration

    Hello All, As I know, Live Web Collaboration in SAP E-Commerce for mySAP CRM (B2B, B2C Shops, and Internet Customer Self-Service) supports chat in CRM Interaction Centre WebClient, so that customer requests for assistance via chat are forwarded direc

  • Is there pakages you can buy for itunes like 20 songs for $10

    Was wondering if there were packge deal you can buy here instead of buying .99 a song

  • Mac os 10.8.3 Mail

    I have just updated to Mac OS 10.8.3 and mail will not connect with iCloud to receive messages. Have clicked on Take All Accounts Online in Mailbox Menu, have repaired permissions and restarted. The warning symbol next to inbox shows and messages in