Spooling From SQL Command Line

Previous
Previous
Next
Next

The SPOOL command can be used to direct the output from SQL Command Line to a disk file, which enables you to save the output for future review.

To start spooling the output to an operating system file, you enter the SPOOL command followed by a file name. For example:

SQL> SPOOL my_log_file.log

If you want to append the output to an existing file:

SQL> SPOOL my_log_file.log APPEND

To stop spooling and close a file, enter the following:

SQL> SPOOL OFF