Whenever SQL*Plus starts up, it looks for a file named glogin.sql under the directory $ORACLE_HOME/sqlplus/admin. If such a file is found, it is read and the containing statements executed. This allows to store settings (such as linesize) across SQL*Plus sessions. New simce Oracle 10g, Oracle also reads glogin.sql and login.sql at a connect in SQL*Plus.
After reading glogin.sql, SQL*Plus also looks for a file named login.sql in the directory from where SQL*Plus was and in the directory that the environment variable SQLPATH points to and reads it and executes it.
Settings from the login.sql take precedence over settings from glogin.sql
If the restriction level is set to 3, the login.sql is not read.
EXAMPLE login.sql SCRIPT
SET SQLPROMPT "&_user > " SET TIMING ON