Questions tagged [spool]

SPOOL is an acronym for simultaneous peripheral operations on-line. It is a type of buffering. The most common spooling application is print spooling, which places a task (or 'print job') into a queue for extended or later processing.

spool
Filter by
Sorted by
Tagged with
41 votes
1 answer
62k views

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 ...
39 votes
3 answers
143k views

Remove Column Header into the Output Text file

I want to create a flat file (text file) of my query from Oracle SQL Developer. I have successfully created the text file using SPOOL, thru a script text file, but i want to remove the header of each ...
Marvin Wong's user avatar
24 votes
4 answers
50k views

sqlplus spooling: How to get rid of first, empty line?

I'm doing the following spooling statement: SET VERIFY OFF SET FEEDBACK OFF SET HEADING OFF SET TRIMSPOOL ON SET TERM OFF SPOOL &pathRelations START scripts/relations.sql &parent SPOOL OFF ...
user avatar
9 votes
2 answers
57k views

Append to spool file Oracle

I have one script file called Test.sql in D:\Scripts folder and the content of the file is given below SET SERVEROUTPUT ON SET DEFINE OFF SPOOL Test.log; SELECT USER_NAME FROM TUP_USER WHERE USER_ID=...
Sarath Subramanian's user avatar
9 votes
2 answers
57k views

Clear the heading in Oracle spool

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; ...
Srinivasan Thirunavukkarasu's user avatar
8 votes
2 answers
10k views

How to send spool from swiftmailer without using command

How to send spool from swiftmailer without using command? php app/console swiftmailer:spool:send --env=prod I need to put this somehow into php file so that Server admin can add this to Schedule.
Tom's user avatar
  • 1,203
8 votes
3 answers
18k views

PostgreSQL query/error logging for .sql scripts

Here is the problem: I need to know how to get all PostgreSQL output from an executed .sql script to log to a file, including errors and query results. I have already surrounded my script with \o ...
Adam's user avatar
  • 3,728
7 votes
6 answers
6k views

Coldfusion 9, How do you Empty an "Undelivered Mail Queue"

I have roughly 9,000 undelivered messages in my mail spool in Coldfusion 9. As far as I can tell the only way to manage these messages is to manipulate them 10 at a time through the CF Admin GUI. I'...
Dave Ostrander's user avatar
7 votes
4 answers
217k views

How to create a oracle sql script spool file

I have a question about spooling the the results of my program. My sample sql script looks like this. whenever sqlerror exit failure rollback set heading off set arraysize 1 set newpage 0 ...
user987900's user avatar
7 votes
1 answer
3k views

How to define an additional mailer service to use the spool and send instant emails in Symfony2

In my Symfony2 web app I'm supposed to send two kind of emails: instant and bulk. The instant emails should be send right away while the bulk emails should be send using the spool. With the default ...
David Barreto's user avatar
7 votes
4 answers
55k views

Header formatting while spooling a csv file in sqlplus

I am required to spool a csv from a table in Oracle, using sqlplus. Following is the format required: "HOST_SITE_TX_ID","SITE_ID","SITETX_TX_ID","SITETX_HELP_ID" "664436565","16","2195301","0" "...
Tech_Coder's user avatar
6 votes
4 answers
13k views

Prevent output of SPOOL from being wrapped

I'm trying to generate all DDLs for objects in a Database using the SPOOL command in SQLPLUS: SET trimspool ON SET wrap off SET heading off SET linesize 300 SET echo off SET pages 999 SET long 90000 ...
Filippo's user avatar
  • 361
5 votes
6 answers
53k views

spool with column headers in pipe delimited sqlplus

I currently am spooling a pipe file via this sqlplus script: set feedback off set echo off set verify off set pagesize 0 set heading off set termout off set trim on ...
lightweight's user avatar
  • 3,267
5 votes
6 answers
56k views

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 ...
FrustratedWithFormsDesigner's user avatar
5 votes
3 answers
1k views

Additional mailer service to use the spool and send instant emails in Symfony2 - strange headers

by default I use spool mailing solution for sending newsletter in my web page. But I also need to send email immediately. So I have used this solution If I send newsletter with Spool everything is ...
Tom's user avatar
  • 1,203
5 votes
6 answers
10k views

C# winspool.drv call to WritePrinter not printing

I'm using some code I found online which was a solution to someone else's similar printing problem. The code appears to run fine, and even errors out when I would expect it to (for example, when I ...
spoof3r's user avatar
  • 617
5 votes
2 answers
5k views

Can I reprint a spool file?

Is there a way to reprint a spool file? I can't find any example or article to say if there is a way or not. edit: when i say reprint it, i mean to the same printer
sgkin's user avatar
  • 113
5 votes
1 answer
3k views

Counting the number of printed pages in C#

I am developing a print spool monitor to count the number of pages that are printed by a certain printer. I am new to this area, so I am using the following article as my reference. Print Monitor ...
Chathuranga Chandrasekara's user avatar
4 votes
1 answer
2k views

mutt sort by score and date

I'd like to have messages in the mutt spool sorted by reverse-score and if the score is the same then by reverse-date. Is it possible? If I set sort=reverse-score then the secondary sort seems to be ...
hasan's user avatar
  • 638
4 votes
0 answers
979 views

beeline spool Hive puts special character instead of quote

I am exporting query results form hive using beeline, here is my command : beeline -u 'jdbc:hive2://myhost.com:10000/mydb;principal=hive/myhost.COM' --incremental=true --silent=true --outputformat=...
Thelight's user avatar
  • 369
3 votes
3 answers
48k views

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 ...
joec's user avatar
  • 3,543
3 votes
3 answers
27k views

What is the equivalent of the spool command in MySQL?

I know you use the spool command when you are trying to write a report to a file in Oracle SQLplus. What is the equivalent command in MySQL? This is my code: set termout off spool ${DB_ADMIN_HOME}/...
rambokayambo's user avatar
3 votes
3 answers
21k views

Spooling in Oracle adds spaces to columns... how can I avoid it?

I'm saving the results of a query in a csv file but unwanted spaces are added to some of the fields, when the original data in the database does not contain them. For example, if one of the rows in ...
toofast's user avatar
  • 33
3 votes
1 answer
2k views

Can Spool Dir of flume be in remote machine?

I was trying to fetch files from a remote machine to my hdfs whenever a new file has arrived into a particular folder. I came across the concept of spool dir in flume, and it was working fine if the ...
jintocvg's user avatar
  • 158
3 votes
1 answer
10k views

sqlplus spool file with parameter

I have an sql file which is executed from command line, it works fine. sqlplus username/password@DBInstance @filename.sql My filename.sql looks about this: set colsep ';' set echo off set feedback ...
Denis Babichev's user avatar
3 votes
2 answers
8k views

Oracle SQLPlus spool command not working when script is scheduled with crontab?

I have written a bash script as shown below. The script works when I run it using bash exec_proc_daily_20.sh on the commandline. The log files are created successfully with records inside as a result ...
Fokwa Best's user avatar
  • 3,452
3 votes
1 answer
425 views

S3 spool bucket / anonymous PUT

I'd like to use S3 CORS and key expiration to create a 'spool bucket'. This spool bucket should support the following: Frontend code (say, jQuery) should be able to HTTP PUT arbitrarily named keys to ...
Yaniv Aknin's user avatar
  • 4,173
3 votes
1 answer
25k views

How to use spool command in sql developer oracle

Dears, I cannot use spool command. It is not working or i am not doing something right. I am trying to save query result in txt file (tried also csv saving with select /*csv*/ * from table but it ...
orangutangas's user avatar
3 votes
1 answer
17k views

Executing sql file from another sql file

I have a .sql file with name Alter_table.sql which have the following code. alter table mytable add newcolumn VARCHAR2(1); I don't want to edit this file and add a spool command. However I need to ...
Sarath Subramanian's user avatar
3 votes
2 answers
28k views

How do I execute oracle query using shell scripting and send the results in the email

I am new to Unix scripting. I have an oracle DB which has a username, password, hostname, port and servicename. I want to connect the database and run the query and in the end the result should be ...
sachin bhandari's user avatar
3 votes
2 answers
26k views

How to output query results to CSV file using spool command in Oracle SQL Developer

I am trying to output the results of a SQL query to a CSV file using the SPOOL command in Oracle SQL Developer. I am able to output the results of a trivial query by calling it as a script. Here is ...
b00kgrrl's user avatar
  • 587
3 votes
1 answer
3k views

Oracle query output is incomplete when spooled to file

Recently I've had to increase the volume of an data extraction script and I've found the output to be missing some data that is present in the source tables. Can anyone suggest some ideas for what ...
stevenl's user avatar
  • 6,788
3 votes
3 answers
10k views

"Unknown set option" in SQL developer which creating Spool script

My code is as below- set define on; set spool on; set SQLFORMAT csv; set fpath = &folderpath; spool @fpath/mycsvfile1.csv select * from I_PTY; spool off; spool @fpath/mycsvfile2.csv select * from ...
Mannu's user avatar
  • 33
3 votes
1 answer
5k views

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 ...
zihaoyu's user avatar
  • 5,571
3 votes
1 answer
802 views

Spool mail and send directly mail

I need 2 kind of mails: Spool mail (for bulk mails) Direct mail (like a register mail) Now I have 2 services: <service id="spool_mailer" class="%swiftmailer.class%"> <argument type="...
Mitchel Verschoof's user avatar
3 votes
1 answer
8k views

File format of spool files with .tmp extensions?

In many Windows setups, when you print directly to a printer, two files are typically created in the windows spool directory "C:\Windows\System32\spool\PRINTERS". A spool file "80021.SPL" and a ...
Ultratrunks's user avatar
  • 2,504
2 votes
7 answers
36k views

oracle sql plus spool

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 ...
CC.'s user avatar
  • 2,878
2 votes
1 answer
28k views

Adding a newline in a spool file

Is there a way to add a newline in an sql spool file? I need the file to be structured in a specific way. '\n' doesn't seem to work and gets printed literally thanks, Update: my SQL file -- ...
Andreas's user avatar
  • 2,027
2 votes
1 answer
641 views

Send emails via memory in controllers and spool in some commands in Symfony2

I need to use the spool option to send massive emails to my users, but i won't to change whole config of my app to spool because my register system send an email to the user and i want that this email ...
Borja Pombo's user avatar
2 votes
2 answers
12k views

How to select spool's filename from table in sqlplus

how could I select the name of my spool filename from a table in sqlplus? I have something like: SPOOL ON SPOOL XXXXXXXXX.bkp SELECT * FROM my_table WHERE field1='value'; SPOOL OFF And want the ...
Fernando Rybka's user avatar
2 votes
2 answers
23k views

SQLPlus dynamic spool filename

i have an Oracle db and i want to export data to a file.However filename, extension and separator will take value from table. The problem is that i can't use the values from table. Could you suggest ...
Seth De's user avatar
  • 37
2 votes
4 answers
17k views

Remove leading spaces and the SQL> tags when spooling

I m doing an export using SQL*Plus using the following code: Set echo off Set verify off Set feedback off Set heading off Set termout on Set pages 50000 Set linesize 1000 Set newpage none Set colsep ...
Keithx's user avatar
  • 3,064
2 votes
2 answers
27k views

Using Spool in Oracle 11g

I want to use spool functionality in Oracle 11g. I want the entire output to be spooled into a file and a subset of the output to be spooled into a separate file. In the below example I want temp_1....
user1918858's user avatar
  • 1,202
2 votes
3 answers
2k views

Oracle plsql switch case and sqlplus spool

The following query runs in an error at the THAN statement. Is it possible to use a select in the THAN statement? Any ideas on how to make it work? SET SERVEROUTPUT ON SET TERMOUT OFF SET ECHO ...
r0tt's user avatar
  • 379
2 votes
1 answer
1k views

Coldfusion 9 - respool mail

I had a bunch of mail to be sent out that was not. I realized that my mail settings in Coldfusion Administrator were incorrect and have since corrected them. I tested the new settings with new mail ...
Lauren Robinson's user avatar
2 votes
1 answer
5k views

Spool Space Error. Please help optimize

I am trying to generate the below query in Teradata SQL Assistant. Unfortunately I am running into a spool space error. Any tips on how to make this query execute using less resources? SELECT TOP ...
ciw916's user avatar
  • 53
2 votes
2 answers
3k views

How to send 12 000 emails via Swiftmailer in Symfony2?

Sometimes we need to send many emails. We are selecting users by 100, for each user create mail, send it (add to spool), make $em->clear(). But even in production env we cann't send much than 4000 ...
Koc's user avatar
  • 2,375
2 votes
1 answer
887 views

Oracle SQL Spool Output Issues - Headers and Dashes

Good day, Stack Overflow folks. I have a question regarding some SQL code that I'm updated for some regulatory processes that my team has. When I run the following code, I get the export set up just ...
A_Pirates_Favorite_Letter's user avatar
2 votes
1 answer
684 views

What is the equivalent of set termout off in MySQL?

In Oracle SQLPlus, I can write: set termout off spool data.out @query.sql spool off to make sure the query output is sent to the file data.out and not to the terminal. Is there a way I can do the ...
codeforester's user avatar
  • 41.2k
2 votes
1 answer
6k views

SQLcl unable to set spool to file

In SQLcl setting spool to file gives error "SP2-0556: Invalid File Name". There are no whitespaces in file name, and the path is correct (folder C:\Temp does exist). Have tried; spool load_data.sql ...
Davor's user avatar
  • 25

1
2 3 4 5
7