sqlplus set命令

msdnchina發表於2010-12-02
set echo off
Controls whether or not to echo commands in a script. that is executed with @, @@ or START. ON displays the commands on screen.
OFF suppresses the display. ECHO does not affect the display of commands you enter interactively or redirect to SQL*Plus from the operating system.


set termout off
suppresses the display so that you can spool output from a script. without seeing it on the screen.


set trimout on
SET TRIMOUT is not supported in iSQL*Plus

Determines whether SQL*Plus puts trailing blanks at the end of each displayed line.
ON removes blanks at the end of each line, improving performance especially when you access SQL*Plus from a slow communications device.
OFF enables SQL*Plus to display trailing blanks. TRIMOUT ON does not affect spooled output.

set trimspool on
SET TRIMOUT ON or SET TRIMSPOOL ON removes trailing blanks at the end of each displayed or spooled line.
Setting these variables ON can reduce the amount of data written.
However, if LINESIZE is optimal, it may be faster to set the variables OFF.
The SQL*Plus output line is blank filled throughout the query processing routines so removing the spaces could take extra effort.
SET TRIMOUT and SET TRIMSPOOL are not supported in iSQL*Plus.

set heading off
Controls printing of column headings in reports.
ON prints column headings in reports; OFF suppresses column headings.
The SET HEADING OFF command does not affect the column width displayed, it only suppresses the printing of the column header itself.



set pagesize 0
Sets the number of rows on each page of output in iSQL*Plus, and the number of lines on each page of output in command-line and Windows GUI.
Increase PAGESIZE to avoid printing headings frequently, or set it to 0 to prevent headings being displayed.

set verify off
set linesize 800
SET LINESIZE sets the total number of characters that SQL*Plus displays on one line before beginning a new line.

Keep LINESIZE as small as possible to avoid extra memory allocations and memory copying.

However, if LINESIZE is too small, columns that cannot fit next to each other are put on separate lines. This may reduce performance significantly.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/161195/viewspace-680807/,如需轉載,請註明出處,否則將追究法律責任。

相關文章