SQLPLUS环境变量设置

在ORACLE_HOME\SQLPLUS\ADMIN 下有一个GLOIN. SQL文件,在每次启动SQLPLUS时候都会自动运行此脚本。为了以后练习方便,把常用的环境变量加到这个文件当中,就不用每次的设置。
WIN2003上如下:
D:\oracle\product\10.2.0\db_1\sqlplus\admin\glogin.sql

--
-- Copyright (c) 1988, 2004, Oracle Corporation.  All Rights

Reserved.
--
-- NAME
--   glogin.sql
--
-- DESCRIPTION
--   SQL*Plus

global login "site profile" file
--
--   Add any SQL*Plus commands here

that are to be executed when a
--   user starts SQL*Plus, or uses the

SQL*Plus CONNECT command
--
-- USAGE
--   This script. is automatically

run
--

-- Used by Trusted Oracle
COLUMN ROWLABEL FORMAT A15

-- Used

for the SHOW ERRORS command
COLUMN LINE/COL FORMAT A8
COLUMN ERROR   

FORMAT A65  WORD_WRAPPED

-- Used for the SHOW SGA command
COLUMN

name_col_plus_show_sga FORMAT a24
COLUMN units_col_plus_show_sga FORMAT

a15
-- Defaults for SHOW PARAMETERS
COLUMN name_col_plus_show_param

FORMAT a36 HEADING NAME
COLUMN value_col_plus_show_param FORMAT a30

HEADING VALUE

-- Defaults for SHOW RECYCLEBIN
COLUMN

origname_plus_show_recyc   FORMAT a16 HEADING 'ORIGINAL NAME'
COLUMN

objectname_plus_show_recyc FORMAT a30 HEADING 'RECYCLEBIN NAME'
COLUMN

objtype_plus_show_recyc    FORMAT a12 HEADING 'OBJECT TYPE'
COLUMN

droptime_plus_show_recyc   FORMAT a19 HEADING 'DROP TIME'

-- Defaults

for SET AUTOTRACE EXPLAIN report
-- These column definitions are only

used when SQL*Plus
-- is connected to Oracle 9.2 or earlier.
COLUMN

id_plus_exp FORMAT 990 HEADING i
COLUMN parent_id_plus_exp FORMAT 990

HEADING p
COLUMN plan_plus_exp FORMAT a60
COLUMN object_node_plus_exp

FORMAT a8
COLUMN other_tag_plus_exp FORMAT a29
COLUMN other_plus_exp

FORMAT a44

-- Default for XQUERY
COLUMN result_plus_xquery HEADING

'Result Sequence'

define _editor=notepad
set serveroutput on size 1000000
set trimspool on
set long 5000
set linesize 100
set pagesize 9999
column plan_plus_exp format a80
column global_name new_value gname
set termout off
define gname=idle
column global_name new_value gname
select lower(user) || '@' || substr( global_name, 1, decode( dot, 0,
length(global_name), dot-1) ) global_name
  from (select global_name, instr(global_name,'.') dot from global_name

);
set sqlprompt '&gname> '
set termout on

SQLPLUS环境变量设置_第1张图片

未命名.jpg

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15720542/viewspace-743326/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/15720542/viewspace-743326/

你可能感兴趣的:(SQLPLUS环境变量设置)