Oracle Server Manager User's Guide

Contents Index Home Previous Next

SET

Purpose

Set or change characteristics of the current command line mode session.

Prerequisites

None.

Syntax

SET command ::=

where:

AUTO- RECOVERY Specifying ON causes the RECOVER command to automatically apply the default filenames of archived redo log files needed during recovery. No interaction is needed when AUTORECOVERY is set to ON, provided the necessary files are in the expected locations with the expected names. The filenames used when AUTORECOVERY is ON are derived from the values of the initialization parameters LOG_ARCHIVE_DEST and LOG_ARCHIVE_FORMAT.
OFF, the default option, requires that you enter the filenames manually or accept the suggested default filename given.
CHARWIDTH integer Sets the column display width for CHAR data. If entered with no argument, returns the setting to the default. The default is 80; the range of values is operating system-specific.
COMPATIBILITY Sets compatibility mode to V6, V7, or NATIVE. The compatibility mode setting affects the specification of character columns, integrity constraints, and rollback segment storage parameters. NATIVE matches the version of the database.
CHAR Columns: When creating tables in Version 6 compatibility mode, CHAR columns are variable length. In Oracle7, such column definitions are fixed length.
Integrity Constraints: In Version 6 compatibility mode, the Version 6 syntax is still recognized, and the Oracle7 syntax is disabled. For V6 mode, table constraints on CREATE TABLE statements are specified with V6 syntax:
CREATE TABLE {UNIQUE | PRIMARY KEY} CONSTRAINT ....
and specified constraints are disabled by default. For V7 mode, table constraints are specified with Oracle7 syntax:
CREATE TABLE CONSTRAINT .... {UNIQUE | PRIMARY KEY}
and they are enabled.
Rollback Segment Parameters: Version 6 compatibility mode allows PCTINCREASE and MAXEXTENTS to be specified for rollback segments, as well as for other segments. Although the specifications are ignored, the syntax is allowed. (Use of these parameters is not recommended. They exist only for backward compatibility.)
Bind Variables: Bind variables of type VARCHAR2 are given type CHAR in Version 6 compatibility mode.
DATEWIDTH integer Sets the column display width for DATE data. If entered with no argument, the setting returns to the default. The default is 9; the range of values is operating system-specific.
ECHO ON enables echoing of commands entered from command files. OFF, the default, disables echoing of commands.
In a SQL Worksheet the default is ECHO ON.
INSTANCE instance-path Changes the default instance for your session to the specified instance path. Does not connect to a database. The default instance is used for commands when no instance is specified.
Any commands preceding the first use of SET INSTANCE communicate with the default instance.
To reset the instance to the default value for your operating system, you can either enter SET INSTANCE with no instance-name or SET INSTANCE LOCAL. See your operating system-specific Oracle documentation for a description of how to set the initial default instance.
This command may only be issued when SQL*Net is running. You can use any valid SQL*Net connect string as the specified instance path. See your operating system-specific Oracle documentation for a complete description of how your operating system specifies SQL*Net connect strings. The maximum length of the instance path is 64 characters.
LOGSOURCE pathname Specifies the location from which archive logs are retrieved during recovery. The default value is set by the LOG_ARCHIVE_DEST initialization parameter. Issuing the SET LOGSOURCE command without a pathname restores the default location.
LONGWIDTH integer Sets the column display width for LONG data. If entered with no argument, the setting returns to the default. The default is 80; the range of values is operating system-specific.
MAXDATA integer Sets the maximum data size. Indicates the maximum data that can be received in a single fetch during a SELECT statement. The default is 20480 bytes (20K). The maximum is operating system-specific.
NUMWIDTH integer Sets the column display width for NUMBER data. If entered with no argument, the setting returns to the default. The default is 10; the range of values is operating system-specific.
RETRIES integer | INFINITE Sets the number of tries that are attempted when the RETRY option is used with the STARTUP command (see "STARTUP" [*]). INFINITE, the default, specifies an infinite number of retries.
SERVEROUTPUT ON enables debugging output from stored procedures that use DBMS_OUTPUT PUT and PUT_LINE commands. OFF disables output.
You can specify the size in bytes of the message buffer using the syntax SIZE n. That is the total number of bytes of all messages sent that can be accumulated at one time. The minimum is 2,000 bytes. If the buffer fills before calls to the get-message routines make room for additional message bytes, an error is returned to the message-sending program.
STOPONERROR Specifying ON indicates that if a command file is running and an error occurs, execution should terminate. OFF disables STOPONERROR.
TERMOUT ON, the default, enables terminal output for SQL commands. OFF disables terminal output. Useful for preventing output to terminal when spooling output to files. Note that nothing appears on the terminal until SET TERMOUT ON is used.
TIMING ON displays parse, execute, and fetch times (CPU and elapsed) for each SQL statement executed. OFF, the default, does not display timing information.
Examples

SET INSTANCE D:DEV-PROD

SET TIMING ON 
SET LONGWIDTH 132 
SET NUMWIDTH 20 
SET CHARWIDTH 5 

Either of the following commands can be used to revert to the initial default host:

SET INSTANCE 
SET INSTANCE LOCAL 


Contents Index Home Previous Next