|SQL*Plus® User's Guide and Reference
|PDF · Mobi · ePub|
SPOOL is not available in iSQL*Plus.
SPO[OL] [file_name[.ext] [CRE[ATE] | REP[LACE] | APP[END]] | OFF | OUT]
Represents the name of the file to which you wish to spool. SPOOL followed by file_name begins spooling displayed output to the named file. If you do not specify an extension, SPOOL uses a default extension (LST or LIS on most systems). The extension is not appended to system files such as /dev/null and /dev/stderr.
Enter SPOOL with no clauses to list the current spooling status.
You must use quotes around file names containing white space.
To create a valid HTML file using SPOOL APPEND commands, you must use PROMPT or a similar command to create the HTML page header and footer. The SPOOL APPEND command does not parse HTML tags.
SET SQLPLUSCOMPAT[IBILITY] to 9.2 or earlier to disable the CREATE, APPEND and SAVE parameters. See SQL*Plus Compatibility Matrix to determine what functionality is controlled by the SET SQLPLUSCOMPAT[IBILITY] command.
To record your output in the new file DIARY using the default file extension, enter
SPOOL DIARY CREATE
To append your output to the existing file DIARY, enter
SPOOL DIARY APPEND
To record your output to the file DIARY, overwriting the existing content, enter
SPOOL DIARY REPLACE
To stop spooling and print the file on your default printer, enter