My glogin. SQL settings

Time:2019-10-12

The $ORACLE_HOME/sqlplus/admin/glogin.sql file is similar to bash’s. bash_profile file, which can pre-execute some default settings when starting sqlplus. For DBAs that often use sqlplus as a management tool, sqlplus can be used more efficiently after it is set up.

Relative to glogin. sql, there is also a login. sql, which can point to the directory where login. SQL is located using the SQLPATH environment variable. When sqlplus is started, first execute the settings in globin.sql, and then execute login.sql.

My own glogin. SQL is as follows:

-- define vi as sqlplus editor
DEFINE _EDITOR = vi
set pagesize 999
set linesize 150
-- set sql prompt like 'SYS>'
set sqlprompt "&_user> "
set serveroutput on
set feedback off
alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';
set feedback on