spool

Ways to avoid eager spool operations on SQL Server

I have an ETL process that involves a stored procedure that makes heavy use of SELECT INTO statements (minimally logged and therefore faster as they generate less log traffic). Of the batch of work that takes place in one particular stored the stored procedure several of the most expensive operations are eager spools that appear to just...

Printing only starts after last page spools.

I'm having a problem that printing in VB.net where any network printer i choose is waiting untill the last page is spooled before printing begins. However i'm looking to have it begin printing after the first page. The printer is set to 'Start printing immediatly', and this is giving me huge problems as we're trying to print duplex docu...

Create a Spooled File from Java with a specified Job name on iSeries

Is there a way to specifiy the JOB name when creating a spooled file? So that my created s.f. doesn't have the default "QPRTJOB". My method that creates a spooled file with the default QPRTJOB job: public static SpooledFile createSpoolFile( com.ibm.as400.access.AS400 as, PrinterFile pPrinterFile, OutputQueue outq, String ...

oracle spool query

Hi All, I have written the sql by name cashload.txt on unix box and kept it on the following location on unix box: exit |sqlplus -s batch/password@SW_TEST @/soft/checkfree/AccurateBXG/scripts/cashload.txt In the cashload.txt the below code is written: spool /Detail/reports/inner/SW/Rep_OIbyAccount_$DATE_FILE.csv select accountnumber|...

Windows print spooler limitations?

Is there a limit on how many print jobs can be queued up in the Windows Print Spooler? ...

Counting colour and grayscale print jobs

Hi I'm writing a small application that's supposed to count the number of colour and grayscale jobs going to local printers. It's meant to cross reference with what the printer records. If there is any non-grayscale elements on the job, the printer records a colour job. At the moment I'm using the EnumJobs call but I can't get any col...

Oracle Unicode Spooling

How can I spool data from a table to a file which contains Unicode characters? I have a sql file which I execute from SQL*Plus screen and its content is: SET ECHO OFF SET FEEDBACK OFF SET HEADING OFF SET PAGESIZE 0 SPOOL STREET_POINT_THR.BQSV SELECT GEOX||'`'||GEOY||'`'||UNICODE_DESC||'`'||ASCII_DESC FROM GEO.STREET_POINTS; SPOOL OFF ...

How to tell SQLexec not to wrap characters?

I'm using Oracle 11g. Also using the spool command to get the output of a query to a file. The problem is that sqlexec is wrapping the characters and making my life miserable. Now under normal circumstances this might be fine however the spool file is on average a 100,000 lines and more so because sqlexec keeps giving me line breaks .......

How does one intercept the Windows Vista/Server 2008/7 XPS print stream?

I'm planning to write a program that calculates the costs of users' print jobs and, for expensive jobs, prompts them if they want to continue printing anyway. (I know that there are existing utilities like GreenPrint that do something similar; my approach is a bit different.) I am curious if there is a straightforward way to intercept X...

Clear the heading in Oracle spool

Hi, I have spooled a file before running the below command and got the output like this, I have set heading off, feedback off SET HEADING OFF SET FEEDBACK OFF SPOOL D:\TEST.TXT SELECT SYSDATE FROM DUAL; SPOOL OFF OUTPUT in TEST.TXT: SQL> SELECT SYSDATE FROM DUAL; 20-JAN-09 SQL> SPOOL OFF How can i remove the two SQL> lines. I wan...

postfix re-processing of spool - ubuntu

This is not technically a programming question but perhaps someone can help me. Yes, it's totally off topic, but i'm desperate for help as I'm no expert at this type of thing. We had a problem on our mail server over the weekend and upon updating postfix, i noticed that mail was no longer being delivered to the /home/$user/Maildir/ as d...

Stop spool printing the sql query used (Oracle)

I have this running in SQLplus set feedback off set pagesize 0 spool TypeDrop.sql select distinct 'drop type '||object_name|| ';' from user_objects where object_type='TYPE'; spool off It prints out to TypeDrop.sql: SQL> select distinct 'drop type '||object_name||';' from user_objects where object_type='TYPE'; drop type ADDRESS_OBJTY...

oracle sql plus spool

Hi. I'm using sql plus to execute a query (a select) and dump the result into a file, using spool option. I have about 14 millions lines, and it takes about 12 minutes to do the dump. I was wondering if there is something to make the dump faster? Here below my sql plus options: whenever sqlerror exit sql.sqlcode set pagesize 0...

SQLPlus - spooling to multiple files from PL/SQL blocks

I have a query that returns a lot of data into a CSV file. So much, in fact, that Excel can't open it - there are too many rows. Is there a way to control spool to spool to a new file everytime 65000 rows have been processed? Ideally, I'd like to have my output in files named in sequence, such as large_data_1.csv, large_data_2.csv, large...

Spooling a query containing an XMLTYPE column using sqlplus

I have a query that concatenates (manually by ||) a handful of columns, one of which is an XMLTYPE field (calling getClobVal() on it) . If I spool the query output using sqlplus with the following options set: set long 30000; set pagesize 0; set feedback off; I get all of the content as desired, but with cr/lf's after 80 characters, ...

Oracle Spool adds extra LF

Hi. I have a Spool of a Select as : SET SERVEROUTPUT ON WHENEVER SQLERROR EXIT 1 set heading off set feedback off set termout off set echo off set verify off set pagesize 0 set line 1000 set trimspool on spool &1 SELECT '9' || 'c' || chr(10) || myColumn FROM myTable; spool off set feedback on; set term on; exit; The problem is ...

Java print service API: send job to printer spool?

I am using Java print service API to select PrintService and then pass it to JasperReport's JRPrintServiceExporter. The basic idea is to just send a document to the provided PrintService. It is actually using java.awt.print.PrinterJob.print(). It seems like you cannot send a print job to a printer that has PrinterIsAcceptingJobs.NOT_ACC...