SQL*Plus
Configuration
Configuring SQL*Plus
2-5
-- This script is automatically run after glogin.sql
--
-- To change the SQL*Plus prompt to display the current user,
-- connection identifier and current time.
-- First set the database date format to show the time.
ALTER SESSION SET nls_date_format = 'HH:MI:SS';
-- SET the SQLPROMPT to include the _USER, _CONNECT_IDENTIFIER
-- and _DATE variables.
SET SQLPROMPT "_USER'@'_CONNECT_IDENTIFIER _DATE> "
-- To set the number of lines to display in a report page to 24.
SET PAGESIZE 24
-- To set the number of characters to display on each report line to 78.
SET LINESIZE 78
-- To set the number format used in a report to $99,999.
SET NUMFORMAT $99,999
Storing and Restoring SQL*Plus System Variables
From the Command-line you can store the current SQL*Plus system variables in a
script with the STORE command. If
you alter any variables, this script can be run to
restore the original values. This is useful if you want to reset system variables after
running a report that alters them. You could also include the
script in your User
Profile script so that these system variables are set each time you start SQL*Plus.
To store the current setting of all system variables, enter
STORE SET
file_name
Enter a file name and file extension, or enter only the file name to
use the default
extension .SQL. You can use the
SET SUF[FIX] {SQL | text}
command on page 12-153
to change the default file extension.
Do'stlaringiz bilan baham: