Sql*Plus User’s Guide and Reference


Modifying Your LOGIN File


Download 5.34 Mb.
Pdf ko'rish
bet35/103
Sana04.08.2023
Hajmi5.34 Mb.
#1665146
1   ...   31   32   33   34   35   36   37   38   ...   103
Bog'liq
E18404-12

Modifying Your LOGIN File
You can modify your LOGIN file just as you would any other script. The following 
sample User Profile script shows some modifications that you could include:
-- login.sql
-- SQL*Plus user login startup file.
--
Table 2–3
Commands in Profile scripts affecting SQL*Plus User Interface Settings
In a profile script, this 
command ... 
affects the Command-line by ...
SET 
SQLPLUSCOMPAT[IBILITY] 
{x.y[.z]}
Also see the 
SQL*Plus 
Compatibility Matrix
 on 
page 12-148.
Setting the SQL*Plus compatibility mode to obtain the 
behavior the DBA wants for this site. 
SQLPLUS command 
COMPATIBILITY Option
As for SET SQLPLUSCOMPATIBILITY but set with the 
SQLPLUS command COMPATIBILITY option. 
SQLPLUS command 
RESTRICT 
Option
Starting SQL*Plus with the RESTRICT option set to 3 
prevents the User Profile script from being read.


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.

Download 5.34 Mb.

Do'stlaringiz bilan baham:
1   ...   31   32   33   34   35   36   37   38   ...   103




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling