| tenant-type | | slug | set-system-variables-obclient |
OBClient supports various SET variables to control client behavior and output format. The following are some commonly used SET variables.
SET DEFINE
Sets the character used to prefix variable substitutions.
Syntax:
SET DEF[INE] {& | c | ON | OFF}
Description:
SET DEFINE ON: Sets the substitution character to&and turns on the feature.SET DEFINE $: Sets the substitution character to$and turns on the feature (the character must not be alphanumeric or contain spaces).SET DEFINE OFF: Turns off the variable substitution feature.
Example:
SET DEFINE ON;
SET DEFINE $;
SET DEFINE OFF;
Note
Two consecutive occurrences of the substitution character indicate a permanent variable, while one occurrence indicates that the value must be entered. The system always reads from the permanent variable first; if it is empty, the user's input is used.
SET FEEDBACK
Controls the number of records displayed in query result feedback.
Syntax:
SET FEED[BACK] {6 | n | ON | OFF}
Description:
n: Displays the record count when the query returns at least n records (n must be 0-50000).ON: Turns on feedback, equivalent to setting it to 1.OFF: Turns off feedback.
SET FEEDBACK OFF also turns off statement confirmation messages displayed after SQL or PL/SQL statements succeed, such as "Table created" and "PL/SQL procedure successfully completed".
Example:
SET FEEDBACK ON;
SET FEEDBACK 10;
SET FEEDBACK OFF;
SET ECHO
Controls whether commands are echoed in scripts executed using source.
Syntax:
SET ECHO {ON | OFF}
Description:
ON: Displays commands on the screen.OFF: Suppresses display.
ECHO does not affect the display of commands you enter interactively or output redirected from the operating system to OBClient.
SET SQLBLANKLINES
Controls whether SQL*Plus allows blank lines in SQL commands or scripts.
Syntax:
SET SQLBL[ANKLINES] {ON | OFF}
Description:
ON: Interprets blank lines and new lines as part of SQL commands or scripts.OFF: Does not allow blank lines or new lines in SQL commands or scripts (default).
SET HEADING
Controls the printing of column headings.
Syntax:
SET HEA[DING] {ON | OFF}
Description:
ON: Prints column headings (default).OFF: Suppresses column headings.
The SET HEADING OFF command does not affect the displayed column width; it only suppresses the printing of column headings themselves.
SET TERMOUT
Controls the display of output generated by commands in scripts executed using source.
Syntax:
SET TERM[OUT] {ON | OFF}
Description:
ON: Displays output on the screen (default).OFF: Suppresses display so that you can spool output to a file instead of displaying it on the screen.
TERMOUT OFF does not affect the output of commands you enter interactively or output redirected from the operating system to OBClient.
Notice
Output is generated only for commands with ON set; otherwise, no output is generated.
SET PAGESIZE
Sets the number of rows displayed per page.
Syntax:
SET PAGES[IZE] {14 | n}
Note
This command is executable, but OBClient does not support it. It is only for compatibility with some Oracle scripts.
SET TRIMSPOOL
Controls whether trailing spaces in each line are trimmed in spooled output.
Syntax:
SET TRIMS[POOL] {ON | OFF}
Note
This command is executable, but OBClient does not support it. It is only for compatibility with some Oracle scripts.
SET EXITCOMMIT
Specifies whether the default exit behavior is COMMIT or ROLLBACK.
Syntax:
SET EXITC[OMMIT] {ON | OFF}
Note:
ON: Commits work upon exit (default).OFF: Rolls back work upon exit.
Notice
This feature is valid in version 2.2.6.
SET SERVEROUTPUT
Enables or disables the output display of DBMS_OUTPUT.PUT_LINE().
Syntax:
SET SERVEROUT[PUT] {ON | OFF}
Description:
ON: Enables DBMS_OUTPUT output display.OFF: Disables DBMS_OUTPUT output display.
SET NUMWIDTH
Sets the display width for numeric columns.
Syntax:
SET NUM[WIDTH] {10 | n}
Notice
This feature is disabled by default and must be enabled using an environment variable:export DISABLE_SET_NUM_WIDTH=0
