Detailed description of set Command Parameters

Source: Internet
Author: User
Tags truncated

SQL * Plus maintains system variables, also known as set variables. It can be used to create a special environment for SQL * Plus interaction, such as: Set
Set the display width of the number data, the number of rows per page, and the column width. Use the SET command to change these System Changes
You can also use the show command to list them.

The syntax for using the set command is as follows:
Set system variable value

The system variables and their optional values are as follows:
Array [size] {20 (default) | n}
Auto [Commit] {off (default) | on | Imm [ediate]}
BlO [ckterminator] {. (default) | c}
Cmds [EP] {; | c | off (default) | on}
COM [patibility] {V5 | V6 | V7 | native (default )}
CON [Cat] {. (default) | c | off | on (default )}
Copyc [ommit] {0 (default) | n}
CRT
Def [ine] {& | c | off | on (default )}
Echo {off | on}
Embedded {off (default) | on}
ESC [Ape] {(default) | c | off (default) | on}
Feed [Back] {6 (default) | n | off | on}
Flu [sh] {off | on (default )}
Hea [Ding] {off | on (default )}
Heads [EP] {| (default) | c | off | on (default )}
LIN [esize] {80 (default) | n}
Long {80 (default) | n}
Longc [hunksize] {80 (default) | n}
Maxd [ata] n
Newp [age] {1 (default) | n}
Null text
Numf [ormat] format
Num [width] {10 (default) | n}
Pages [ize] {14 (default) | n}
Pau [se] {off (default) | on | text}
Recsep {WR [apped] (default) | EA [CH] | off}
Recsepchar {| c}
Scan {off | on (default )}
Serverout [put] {off | on} [size N]
Show [mode] {off (default) | on}
Spa [ce] {1 (default) | n}
Sqlc [ASE] {mix [ed] (default) | lo [wer] | up [per]}
Sqlco [ntinue] {>; (default) | text}
Sqln [umber] {off | on (default )}
Sqlper [Fix] {# (default) | c}
Sqlp [rompt] {SQL>; (default) | text}
Sqlt [erminator] {; (default) | c | off | on (default )}
SUF [Fix] {SQL (default) | text}
Tab {off | on (default )}
Term [out] {off | on (default )}
Ti [Me] {off (default) | on}
TIMI [ng] {off (default) | on}
Trim [out] {off | on (default )}
Und [erline] {-(default) | c | off | on (default )}
Ver [ify] {off | on (default )}
Wra [p] {off | on (default )}

System variable description:
Array [size] {20 (default) | n} sets the number of rows in a batch, which is the number of rows that SQL * Plus obtains from the database at a time. The valid value is 1 to 5000. A large value can improve the validity of queries and subqueries. Many Rows can be obtained, but more memory is required. when the number exceeds 1000, the effect is not very good.

Auto [Commit] {off (default) | on | Imm [ediate]} controls Oracle's submission of database modifications. when you set on, you can submit changes to the database after each SQL command or PL/SQL block is executed in Oracle. When you set off, automatic submission is stopped and modifications must be submitted manually, for example, use the SQL commit command. the immediate function is the same as that of on.

BlO [ckterminator] {. (default) | c} is a non-alphanumeric character used to end PL/SQL blocks. To execute blocks, you must run the Run Command or/command.

Cmds [EP] {; | c | off (default) | on} is a non-alphanumeric character used to separate multiple SQL/plus commands entered in one line. on or off controls whether multiple commands can be entered in one line. on will automatically set the command separator to semicolon (;). c Indicates the character.

COM [patibility] {V5 | V6 | V7 | native (default)} specifies the Oracle version currently linked. if the current Oracle version is 5, set "compatibility" to V5; "version 6 to V6;" 7 to v7. if you want the database to decide the setting, set it to native.

CON [Cat] {. (default) | c | off | on (default)} set end 1 to replace the character referenced by the variable. after the replacement variable reference character is aborted, it can be followed by all characters as part of the experience. Otherwise, SQL * Plus will be interpreted as part of the replacement variable name. when the Concat switch is on, SQL * Plus can reset the value of Concat to point (.).

Copyc [ommit] {0 (default) | n} controls the number of batches for database modification submitted by the copy Command. after N batches of data are copied each time, the data is submitted to the target database. valid values are 0 to 5000. the arraysize variable can be used to set the size of a batch. if copycommit is set to 0, only one commit is executed at the end of the copy operation.

CRT changes the default CRT file used by the SQL * Plus runform command. if the CRT does not contain anything, the CRT only contains ''''. if you want to use new. CRT (the default CRT is old. CRT), you can call form in the following form:
SQL>; runform-C new form name
Or
SQL>; Set CRT new
SQL>; runform form name
The second method stores the CRT selection, so that you do not need to specify the next time you run the runform command (in the same SQL * Plus interaction.

Def [ine] {& | c | off | on (default)} specifies the character used to replace the variable. on or off controls whether SQL * Plus scans and replaces variables with their values. the setting of define ON or OFF controls the setting of scan variables.

Echo {off | on} controls whether the start command lists every command in the command file. If it is on, it lists the command; if it is off, it stops the column list.

Embedded {off (default) | on} controls where each report starts on a page. when it is off, each report is forced to start at the top of the new page; when it is on, a report starts to run anywhere on the page.

ESC [Ape] {(default) | c | off (default) | on} is a character defined as an escape character. if it is off, the escape character does not work. when it is on, enable the escape character to work.

Feed [Back] {6 (default) | n | off | on} shows the number of records returned by the query. on and off are displayed as on or off. when feedback is set to on, it is equivalent to setting n to 1. if you set feedback to 0, it is equivalent to setting it to off.

Flu [sh] {off | on (default)} control the output to the user's display device. when it is off, the operating system will make buffer output; when it is on, the buffer is not allowed. use off only when running command files in non-interactive mode, which can reduce program I/O always and improve performance.

Hea [Ding] {off | on (default)} controls the printing of Column Titles in the report. If it is on, the column title is printed in the report; if it is off, the column title is not printed.

Heads [EP] {| (default) | c | off | on (default)} defines the title delimiter. you can use the title Separator in the column command to split the column title into multiple lines. on and off separate titles into on or off. when the title is separated into off, SQL * Plus prints the title separator like any character.

LIN [esize] {80 (default value) | n} sets the total number of characters that SQL * Plus displays in a row. It also controls the center-aligned text and right-aligned text in ttitle and btitle. linesize can be defined as 1 to the maximum value, and the maximum value depends on the operating system.

Long {80 (default) | n} is the maximum width setting for displaying and copying long values. For oracle7, the maximum value of N is 2 GB; for version 6, the maximum value is 32767.

Longc [hunksize] {80 (default) | n} is the incremental size of the long value retrieved by SQL * Plus. Due to memory restrictions, you can perform incremental search. This variable is only applicable to oracle7.

Maxd [ata] n sets the maximum number of characters that SQL * Plus can handle. The default value and maximum value are variable in different operating systems.

Newp [age] {1 (default) | n} sets the number of blank lines to be printed Between the header and the top title of each page. if the value is 0, a line break is sent between pages and the screen is cleared on many terminals.

The null text setting indicates null text. If null does not contain text, spaces are displayed (lack of time is saved). You can use the null clause in the column command to control the setting of null variables for this column.

Numf [ormat] format sets the default format of the displayed value, which is a numerical format.

Num [width] {10 (default) | n} sets the default width for the displayed value.

Pages [ize] {14 (default) | n} sets the number of rows from the top title to the end of the page. print the report on a 11 inch-long paper with a value of 54 and a value of 1 inch (the value of Newpage is 6 ).

Pau [se] {off (default) | on | text} controls terminal scrolling when the report is displayed. during each pause, you must press the return key. on Causes SQL * Plus to be suspended at the beginning of each report output page. the specified text is displayed when SQL * Plus is paused. to type multiple words, you must enclose the text in single quotes.

Recsep {WR [apped] (default) | EA [CH] | off}
Recsepchar {| c} specifies the condition for displaying or printing the record branch character. A record branch character is a single line consisting of the characters specified by recsepchar. The space is the default character of recsepchar.
Recsep tells SQL * Plus where to separate records. for example, set the recsep to wrapped, and print the record line break after each Winding Line. if you set recsep to each, SQL * Plus prints a line break after each line. if you set the recsep to off, SQL * Plus does not print the line break.

Scan {off | on (default)} controls the scanning of existing replacement variables and values. Off prohibits the processing of replacement variables and values. On allows normal processing.

Serverout [put] {off | on} [size N] determines whether the output is displayed in the SQL * Plus stored procedure. when off, the output is displayed. size: specifies the number of buffer output bytes. The default value is 2000. N cannot be less than 2000 or greater than 1 million.

Show [mode] {off (default) | on} controls whether SQL * Plus lists the new old or new settings when executing the SET command.

Spa [ce] {1 (default) | n} sets the number of spaces between output columns. The maximum value is 10.

Sqlc [ASE] {mix [ed] (default) | lo [wer] | up [per]} converts the case sensitivity of SQL commands and PL/SQL blocks before execution. SQL * Plus converts all the text in the command, including the direct amount and identifier with quotation marks. sqlcase does not change the SQL Buffer itself.

Sqlco [ntinue] {>; (default) | text} When an SQL * Plus command is continued on an additional line, SQL * Plus is prompted Based on the character sequence set.

Sqln [umber] {off | on (default)} is a prompt for setting SQL commands and the second and subsequent rows of PL/SQL blocks. if it is on, the row number is prompted; if it is off, the prompt is set to sqlprompt value.

Sqlper [Fix] {# (default) | c} sets the SQL * Plus prefix character. when you type an SQL command or PL/SQL block, you can type an SQL * Plus command on a separate line. The prefix of SQL * Plus is used as the prefix. SQL * Plus directly executes this command without affecting SQL commands or PL/SQL blocks. the prefix must be a non-alphanumeric character.

Sqlp [rompt] {SQL>; (default) | text} sets the SQL * Plus command prompt.

Sqlt [erminator] {; (default) | c | off | on (default)} sets the characters used to end and execute SQL commands. off means that SQL * Plus does not recognize the command Terminator and ends the SQL command by entering a blank line. on Reset the terminator to the default semicolon (;).

SUF [Fix] {SQL (default) | text} sets the suffix of the default file. SQL * Plus is used in the command to reference the command file. suffix does not control the extension of the output (Spool) file.

Tab {off | on (default)} determines how SQL * Plus formats the blank space in terminal output. when it is off, spaces are used in the output to format the blank space; when it is on, TAB characters are used. the default value of a tab depends on the system. You can use the show tab command to view the default value.

Term [out] {off | on (default)} controls the display of output generated by the file execution command. off indicates that the command file is output offline without output on the screen. the output is displayed on. termout off does not affect interactive command output.

Ti [Me] {off (default) | on} displays the current time before each command prompt when controlling the display of the current date. On; the display of the disabled time when off.

TIMI [ng] {off (default) | on} displays the control time statistics. the time statistics of each running SQL command or PL/SQL block are displayed. When off, the time statistics of every command is disabled.

Trim [out] {off | on (default)} determines whether SQL * Plus can contain spaces at the end of each row. the space at the end of each line is removed when on, especially when SQL * Plus is accessed from a slow communication device, the performance can be improved. When off, SQL * Plus is allowed to display the space at the end. trimout on does not affect off-line output. when tab on is set, SQL * Plus ignores trimout on.

Und [erline] {-(default) | c | off | on (default)} sets the Characters Used for the underline column title in the SQL * Plus report. on or off. Set the underline to on or off.

Ver [ify] {off | on (default)} controls whether the text of the command is listed before and after SQL * Plus is replaced with the value. On displays the text; Off disables the column list.

Wra [p] {off | on (default)} controls whether SQL * Plus truncates the display of data items. when off, the data item is truncated. When on, the data item is allowed to be wound into the next row. use the wrapped and truncated clauses in the column command to control the setting of the wrap for the specified column.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.