Sqlplus login. SQL setting [SQL] define_editor = vi set serveroutput on size 100000 set trimspool on set long 5000 www.2cto.com set linesize 120 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 (sel Ect global_name, instr (global_name ,'. ') dot from global_name); set sqlprompt' & gname> 'set termout on: Save the above Code as a file login. SQL is placed under the $ ORACLE_HOME/sqlplus/admin directory, and then sqlplus is opened. It is found that SQL * PLUS automatically runs two scripts at startup: glogin. SQL, login. SQL. The glogin. SQL file is a default SQLPLUS setting created by ORACLE for All database users. It is stored in the $ ORACLE_HOME/sqlplus/admin/directory. You can put your favorite common settings in the login. SQL file, which is automatically loaded every time sqlplus is started. Run the glogin. SQL file before running the login. SQL file at the startup of www.2cto.com SQL * PLUS. Find glogin. SQL in the default path. The order for searching login. SQL files is as follows: search in the current path first. If yes, run the command and stop searching. If no environment variable is found, check whether the SQLPATH environment variable is set. If the environment variable is already set, search for it in the corresponding path of the variable. If yes, run, stop searching after running. If it is not found, it will stop searching and will not continue searching. If the SQLPATH environment variable is not set, the search will not be continued. Set the SQLPATH environment variable: vi ~ /. Add bash_profile: SQLPATH =/home/oracle/admin/SQL: $ ORACLE_HOME/sqlplus/admin; Add the export SQLPATH to the environment variable and re-open the terminal.