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.

310 questions
1
vote
2 answers

Is there a way to use SET MARKUP CSV on in the Command window in PL/SQL Developer?

My code currently that I am running in the Command Window in PL/SQL Developer: SET MARKUP CSV ON DELIMITER | QUOTE OFF SET FEEDBACK OFF SPOOL C:\Users\Desktop\SpoolTest.csv select * from Vendor_data t where rownum < 20 ; SPOOL OFF; My…
J. Colborn
  • 11
  • 1
  • 4
1
vote
3 answers

How do I find SYSOUT in spool?

After submitting this job I am unable to find SYSOUT in spool. The JCL follows: //IBMUSERP JOB NOTIFY=&SYSUID //STEP2 EXEC PGM=PERFORM1 //STEPLIB DD DSN=IBMUSER.RKSH.LOAD,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* …
1
vote
0 answers

is there any way to auto stop spooler in oracle I close the sqlplus accidentally

If I accidentally Close the sqlplus console of Oracle How I can create some trigger in order to stop the spooling and save the complete data untill that moment in the mentioned spool file.
Ddevil Prasad
  • 117
  • 1
  • 14
1
vote
0 answers

25 GB Oracle table:: Extract data in a file from DB

I have a 25 GB oracle table and I connecting from a server which is not DB server. I was using spool, but even after 8 hours, I am not getting any output and process was still running. I was using bewlo code- sqlplus -s…
1
vote
1 answer

Simulate Oracle SPOOL in Java

HI, I am converting a shell script to a Java program. The shell scripts runs an sql statement and spool the file to an external text file. I want to simulate this in Java. (The output file must be in the exact same format as it was generated in…
budsiya
  • 540
  • 3
  • 14
  • 22
1
vote
2 answers

PL/SQL how to spool multiple files?

Hy Guys, I don't understand how to create a correct script for spool, of multiple files. I have read some question about this problem, but I was unable to solve it. this is my code MAIN_PROCEDURE.sql SET serveroutput ON; SET trimspool ON; SET…
1
vote
1 answer

Spooling Serveroutput into a CSV file

I got the task to update a rather big file that consists of many update and delete statements. First things first would be to check, which statements are actually needed / used. I would like to spool this into a separate file, but it is difficult to…
Allantir
  • 45
  • 4
1
vote
1 answer

SQL*PLUS - SET LINESIZE doesn't have any effect in my script while it's spooling

I'm using PL/SQL Developer version 11.0.6.1776 The following script, creates a folder named 'test' on the specified path and a subfolder within it, with the name of the table that is currently spooling to stored its metadata in that folder: set…
1
vote
2 answers

Oracle SQL, spool to a dynamic file name

I am trying to spool to a csv that contains the current_date in its name: spool '\mydir\'||to_char(current_date,'YYYYMMDD')||'.csv'; SELECT /*csv*/* FROM mydata; spool off; However, I get an error: SP2-0768: Illegal SPOOL command Usage: SPOOL {…
Giuseppe
  • 518
  • 10
  • 22
1
vote
2 answers

SQL*Plus - Spool into multiple files

I've got the next spool that stores the DDL of the user_tables into a file: set pagesize 0 set long 90000 spool C:\Users\personal\Desktop\MAIN_USR\test.txt select DBMS_METADATA.GET_DDL('TABLE',table_name,'MAIN_USR') FROM user_tables ut; spool…
1
vote
1 answer

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 fine, however, I am getting several header rows…
1
vote
1 answer

Getting error while using SPOOL with APPEND

I am using SQLPLUS version DEFINE _SQLPLUS_RELEASE = "1102000200" (CHAR). In which i am trying to spool a file which is already exist with append command. But it's giving me an error as SQL> spool test_dir/test.txt append; SP2-0556: Invalid file…
teepu
  • 266
  • 1
  • 6
  • 18
1
vote
1 answer

Unwanted new lines when spooling an sqlplus result to xml file

I'm trying to extract some data from my database into a XML file. To do so, in use a bash script that calls sqlplus command and spool the result into a new file. The problem happens once the result extracted. My xml file isn't valid anymore because…
Wallarou
  • 63
  • 1
  • 7
1
vote
1 answer

SQL script cshell

I am doing this in my cshell script sqlplus $ORA_UID/$ORA_PSWD @${SQL}test.sql ${DATA}${ext1}thats trying to get output from test.sql script.. in my sql script i am dumping output to spool &1 .. but when i run my script my files are blank i am not…
jack
  • 163
  • 3
  • 9
  • 20
1
vote
0 answers

Control A character delimiter

How to spool oracle table records with control A character as delimiter through sql script in linux? I have tried as below Spool file.dat Select column 1 ||'\u0001'||, column2 ||'\u0001'||, column3 from table spool off Also as Spool…