Sqlplus login environment settings
Set the environment settings for sqlplus login through the glogin.sql file
Edit the glogin file under $ORACLE_HOME/sqlplus/admin
The details are as follows:
Define_editor=viset serveroutput on size 1000000set trimspool onset long 5000set linesize 100set pagesize 9999column plan_plus_exp format a80column global_name new_value gnameset termout offdefine gname=idlecolumn global_name new_value gnameselect 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
Use sqlplus login to view the effect of the settings after saving
[oracle@rac1] $sqlplus system/oracleSQL*Plus: Release 11.2.0.3.0 Production on Mon Dec 7 15:11:45 2015Copyright (c) 1982, 2011, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit ProductionWith the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,Data Mining and Real Application Testing optionssystem@RACDB >
Log in using sys
[oracle@rac1] $sqlplus / as sysdbaSQL*Plus: Release 11.2.0.3.0 Production on Mon Dec 7 15:12:27 2015Copyright (c) 1982, 2011, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit ProductionWith the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,Data Mining and Real Application Testing optionssys@RACDB >