通過glogin.sql文件設(shè)置sqlplus登錄的環(huán)境設(shè)置
渾江網(wǎng)站制作公司哪家好,找創(chuàng)新互聯(lián)建站!從網(wǎng)頁設(shè)計、網(wǎng)站建設(shè)、微信開發(fā)、APP開發(fā)、響應(yīng)式網(wǎng)站開發(fā)等網(wǎng)站項目制作,到程序開發(fā),運(yùn)營維護(hù)。創(chuàng)新互聯(lián)建站從2013年創(chuàng)立到現(xiàn)在10年的時間,我們擁有了豐富的建站經(jīng)驗和運(yùn)維經(jīng)驗,來保證我們的工作的順利進(jìn)行。專注于網(wǎng)站建設(shè)就選創(chuàng)新互聯(lián)建站。
編輯$ORACLE_HOME/sqlplus/admin下的glogin文件
詳細(xì)內(nèi)容如下所示:
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登錄查看設(shè)置后的效果
[oracle@rac1 ~]$ sqlplus system/oracle SQL*Plus: Release 11.2.0.3.0 Production on Mon Dec 7 15:11:45 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 system@RACDB>
使用sys登錄
[oracle@rac1 ~]$ 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 sys@RACDB>