Saturday 24 August 2013

TIP to change the SQL> prompt.



1) Go to ORACLE_HOME/sqlplus/admin.
2) Add this command to glogin.sql file.      set sqlprompt '_USER>';
3) Connect to database.



############################     DEMO   ############################

SQL> exit;


[oracle@demo]$ cd $ORACLE_HOME/sqlplus/admin
[oracle@demo]$ vi glogin.sql

set sqlprompt '_USER>';


[oracle@demo]$ sqlplus dbauser/password

SQL*Plus: Release 11.2.0.3.0 Production on Fri Aug 23 16:28:08 2013
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, OLAP, Data Mining and Real Application Testing options


DBAUSER>



###################################################################
SQL PROMPT OPTIONS

_connect_identifier    will display connection identifier.
_date                  will display date.
_editor                will display editor name used by the EDIT command.
_o_version             will display Oracle version.
_o_release             will display Oracle release.
_privilege             will display privilege such as SYSDBA, SYSOPER, SYSASM
_sqlplus_release       will display SQL*PLUS release.
_user                  will display current user name.




No comments: