Name

SET

Synopsis

SET parameter_setting

The SET command is used to customize SQL*Plus’ operations to your needs. For example:

SET DEFINE OFF
SET SERVEROUTPUT ON SIZE 1000000 -
   FORMAT WORD_WRAPPED
SET NULL '***'

Parameter Settings

SET APPI[NFO] {ON | OFF | app_text }

Controls automatic registration of command files using the DBMS_APPLICATION_INFO package.

SET ARRAY[SIZE] array_size

Sets the number of rows that SQL*Plus will return at one time from the database when executing a query. The default is 1.

SET AUTO[COMMIT] {ON | OFF | IMMEDIATE | statement_count }

Controls whether SQL*Plus automatically commits your changes. Also specifies the number of statements to allow between each commit.

SET AUTOP[RINT] {ON | OFF}

Controls whether SQL*Plus automatically prints the contents of bind variables after they have been referenced in a SQL statement or PL/SQL block.

SET AUTORECOVERY {ON | OFF}

When turned on, allows the RECOVER command to run without user intervention.

SET AUTOT[RACE] {ON | OFF | TRACE[ONLY]} [EXP[LAIN]] [STAT[ISTICS]]

Enables and disables the automatic display of the execution plan and execution statistics for a SQL statement.

SET BLO[CKTERMINATOR] block_term_char

Sets the character used to terminate entry of a PL/SQL block. The default is a period.

SET BUF[FER] {buffer_name | SQL}

Allows you to switch between buffers. Note that only one buffer can be used for executing SQL statements.

SET CLOSECUR[SOR] {ON | OFF}

Controls whether SQL*Plus keeps the statement cursor open all the time.

SET CMDS[EP] {ON | OFF | separator_char }

Controls whether you can enter multiple SQL statements on one line and also sets the separator character. If you turn this option on, then the default separator character is a semicolon.

SET COLSEP column_separator

Controls the text used to separate columns of data. The default is to separate columns using one space.

SET COM[PATIBILITY] {V7 | V8 | NATIVE}

Specifies the Oracle release with which SQL*Plus should be compatible. The default behavior is to let SQL*Plus decide this automatically.

SET CON[CAT] {ON | OFF | concat_char}

Specifies the concatenation character, which marks the end of a substitution variable name in a SQL*Plus statement, SQL statement, or PL/SQL block. The default character is a period.

SET COPYC[OMMIT] batch_count

Controls how often SQL*Plus commits during the execution of a COPY command. The default is 0.

SET COPYTYPECHECK {ON | OFF}

Controls whether type checking is done when using the COPY command to copy data from one table to another.

SET DEF[INE] {ON | OFF | prefix_char}

Specifies the character used to define a substitution variable. The default is the ampersand character (&).

SET DOC[UMENT] {ON | OFF}

Controls whether SQL*Plus displays documentation demarcated by the DOCUMENT command.

SET ECHO {ON | OFF}

Controls whether SQL*Plus displays commands from a command file as they are executed.

SET EDITF[ILE] edit_filename

Specifies the name of the work file used when you invoke an external editor using the EDIT command. The default name is afiedt.buf.

SET EMB[EDDED] {ON | OFF}

Enables and disables the embedded report feature. This allows you to combine two reports into one without resetting the page numbering.

SET ESC[APE] {ON | OFF | escape_char}

Specifies the escape character, which is used in front of the substitution variable prefix character (usually an ampersand), when you want that character interpreted literally and not as part of a variable name. The default character is a backslash ( ).

SET FEED[BACK] {ON | OFF | row_threshold}

Controls whether and when SQL*Plus displays the number of rows affected by a SQL statement.

SET FLAGGER {OFF | ENTRY | INTERMED[IATE] | FULL}

Controls whether SQL*Plus checks your statements for compliance with ANSI/ISO syntax.

SET FLU[SH] {ON | OFF}

Controls whether output may be buffered.

SET HEA[DING] [ON | OFF]

Controls whether column headings are displayed when selecting data.

SET HEADS[EP] {ON | OFF | heading _separator}

Controls the character used to make a line break in a column heading. The default is a vertical bar (|).

SET INSTANCE [service_name | LOCAL]

Specifies the default database instance to use with the CONNECT command.

SET LIN[ESIZE] line_width

Specifies the size of a line in terms of characters. The default LINESIZE is 80 characters.

SET LOBOF[FSET] offset

Is an index into a LONG column, specifying the first character to be displayed. The default is 1.

SET LOGSOURCE logpath

Tells SQL*Plus where to find archive log files for recovery. There is no default.

SET LONG long _length

Specifies the maximum number of characters to display from a column of type LONG. The default is 80.

SET LONGC[HUNKSIZE] size

Controls the number of characters retrieved from a LONG column at one time. The default is 80.

SET MAXD[ATA] max_row_width

Sets the maximum row length that SQL*Plus can handle. This is an obsolete setting, and there is no default.

SET MARK[UP] markup_options

Allows you to specify the markup language to use when generating output. Except for HTML, all markup options are optional. The following are valid markup options:

HTML [ON | OFF]

Specifies the markup language to use and enables or disables the use of that markup language. In release 8.1.6, this is a mandatory option.

HEAD text

Specifies content for the <head> tag. The tag ends up being written as <head>text < /head>. There is no default.

BODY text

Specifies content for the <body> tag. The tag ends up being written as <body text >. There is no default.

ENTMAP {ON | OFF}

Controls whether SQL*Plus uses HTML equivalents such as &lt and &gt for special characters.

SPOOL {ON | OFF}

Controls whether SQL*Plus writes to the spool file using plain text or the specified markup language (currently HTML).

PRE[FORMAT] {ON | OFF}

Controls whether spooled report output is enclosed within <pre>...</pre> tags.

On some operating systems, you need to enclose the entire string of markup options within double quotes.

SET NEWP[AGE] {lines_to_print | NONE}

Controls the number of lines that SQL*Plus prints between pages. A value of zero causes SQL*Plus to print a form-feed character between each page. The default is 1.

SET NULL null_text

Controls the text that SQL*Plus uses to represent a null value. The default is to represent nulls by a space.

SET NUMF[ORMAT] format_spec

Sets the default display format for numbers. There is no default format.

SET NUM[WIDTH] width

Sets the default display width for numbers. SET NUMFORMAT takes precedence over this value. The default width is 9.

SET PAGES[IZE] lines_on_page

Specifies the number of printable lines on a page. The default is 24.

SET PAU[SE] {ON | OFF | pause_message }

Controls whether SQL*Plus pauses after each page of output.

SET RECSEP {WR[APPED] | EA[CH] | OFF}

Controls whether a record-separator line is printed between lines of output. The default is to print separators only when one of the column values in a record has wrapped.

SET RECSEPCHAR separator_char

Controls the character to use for the record separator. The default record separator is a line of space characters.

SET SCAN {ON | OFF}

Enables and disables user variable substitution. This is obsolete in favor of SET DEFINE.

SET SERVEROUT[PUT] {ON | OFF} [SIZE buffer_size] [FOR[MAT] {WRA[PPED] | WOR[D_WRAPPED] | TRU[NCATED]}

Controls whether SQL*Plus prints output from PL/SQL blocks.

SET SHIFT[INOUT] {VIS[IBLE] | INV[ISIBLE]}

Controls the display of shift characters on IBM 3270 terminals.

SET SHOW[MODE] {ON | OFF | BOTH}

Controls whether SQL*Plus displays the before and after values when you change a setting.

SET SPACE num_of_spaces

Specifies the number of spaces to print between columns. The default is 1. This is obsolete in favor of SET COLSEP.

SET SQLBLANKLINES {ON | OFF}

Controls whether you may enter blank lines as part of a SQL statement. This feature was introduced in release 8.1.5.

SET SQLC[ASE] {MIXED | UPPER | LOWER}

Controls automatic case conversion of SQL statements and PL/SQL blocks.

SET SQLCO[NTINUE] continuation_prompt

Allows you to change the continuation prompt used for multiline SQL statements. The default is greater-than (>).

SET SQLN[UMBER] {ON | OFF}

Controls whether SQL*Plus uses the line number as a prompt when you enter a multiline SQL statement.

SET SQLPRE[FIX] prefix_char

Specifies the SQL*Plus prefix character, which allows you to execute a SQL*Plus command while entering a SQL statement or PL/SQL block into the buffer. The default is a pound sign (#).

SET SQLP[ROMPT] prompt_text

Allows you to change the SQL*Plus command prompt. The default is SQL>.

SET SQLT[ERMINATOR] {ON | OFF | term_char }

Controls whether terminating a SQL statement using the semicolon causes it to be executed. Also allows you to change the termination character to something other than a semicolon.

SET SUF[FIX] extension

Specifies the default extension used for command files. The default is .sql.

SET TAB {ON | OFF}

Controls whether SQL*Plus uses tab characters to format whitespace.

SET TERM[OUT] {ON | OFF}

Controls whether SQL*Plus displays output generated from a SQL*Plus script file.

SET TI[ME] {ON | OFF}

Controls whether SQL*Plus displays the current time as part of the command prompt.

SET TIMI[NG] {ON | OFF}

Controls whether SQL*Plus displays the elapsed execution time for each SQL statement or PL/SQL block.

SET TRIM[OUT] {ON | OFF}

Controls whether SQL*Plus trims trailing spaces from lines displayed on the screen.

SET TRIMS[POOL] {ON | OFF}

Controls whether SQL*Plus trims trailing spaces from lines written to a spool file.

SET TRU[NCATE] {ON | OFF}

Controls whether SQL*Plus truncates long lines.

SET UND[ERLINE] {underline_char | {ON | OFF} }

Sets the character used to underline column headings. The default is a hyphen.

SET VER[IFY] {ON | OFF}

Controls whether SQL*Plus displays before and after images of lines containing substitution variables.

SET WRA[P] {ON | OFF}

Controls whether SQL*Plus wraps or truncates long lines.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset