"In the sqlplus operation, many times we want to write our own SQL statements and modify log or result information to record"
"First" must be properly connected to the Oralce database.
and then
After you log in to the Oralce database with the user you specified, in the Sqlplus workspace
Sql>spool D:\oracle.txt;
As on the command, the keyword spool after you want to save all the actions you want to do next and what format you want to save.
............
When you are not going to operate on the database again, or if you intend to close the Sqlplus client tool, close spool and then in the path you just set, you will see the file record you want to save.
Sql>spool D:\oracle.txt;
"About Spool command"
Spool is a sqlplus command that can only be used in Sqlplus.
"About spool settings--common"
Set pagesize 0;
ps:{output the number of pages per line, the default value is 0, in order to avoid paging can be set to 0, but in some Oracle version, does not hold, and when the case processing}
Set COLSEP ";
ps:{output Field Delimiter}
Set echo off;
ps:{displays each command in the start script, which defaults to on}
Set feedback off;
ps:{echo the number of record bars processed by this SQL command, default is on}
Set heading off;
ps:{output domain header, default to On}
Set Linesize 80;
ps {Output the number of characters per line, default is 80}
Set trimout on;
ps:{Remove trailing spaces per line of standard output, default to OFF}
Set Termout off;
ps:{Show execution results of commands in script}
How to save all your actions and results records to the file you specified in Sqlplus