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

bb

fj.png未命名.jpg

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

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值