sqlplus登录环境设置

页面导航:首页 > 数据库 > MsSql > sqlplus登录环境设置

sqlplus登录环境设置

来源: 作者: 时间:2016-01-13 16:40 【

通过glogin.sql文件设置sqlplus登录的环境设置编辑$ORACLE_HOME/sqlplus/admin下的glogin文件详细内容如下所示:define_editor=viset serveroutput on size 1000000set trimspool onset long 5000set l...
通过glogin.sql文件设置sqlplus登录的环境设置
 
编辑$ORACLE_HOME/sqlplus/admin下的glogin文件
 
详细内容如下所示:
define_editor=vi
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登录查看设置后的效果
 
[[email protected] ~]$ sqlplus system/oracle

SQL*Plus: Release 11.2.0.3.0 Production on Mon Dec 7 15:11:45 2015

Copyright (c) 1982, 2011, .  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

[email protected]>

 

 
使用sys登录
 
[[email protected] ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Mon Dec 7 15:12:27 2015

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

[email protected]>

 


Tags:

文章评论

最 近 更 新
热 点 排 行
Js与CSS工具
代码转换工具

<