!!! WATCHOUT !!! – your prompt is not modified on the fly. So every time you connect to a database you should see more details about your connection sqlplus / as will help identify where commands are executed and by who Select sys_context('userenv', 'con_name') as con_name These commands are then sent to the database for.
#Sql prompt options plus#
So to make them permanent modify following file $ORACLE_HOME/sqlplus/admin/glogin.sql vi $ORACLE_HOME/sqlplus/admin/glogin.sqlĬol con_name new_value _container_name noprint SQL Plus is an interactive tool that allows you to type SQL and PL/SQL statements at the command prompt. SQL> set sqlprompt problem is sqlprompt settings are gone once you are disconnected. So SQL prompt will be changed after connect command. SQL> select sys_context('userenv', 'con_name') as container_nameĭEFINE _CONTAINER_NAME = "CDB$ROOT" (CHAR) sql file is not only executed at SQLPlus startup time, but also at connect time as well. SQL> col container_name new_value _container_name noprint SQL> set sqlprompt can define your own substitution variable and refer to it when you set sqlplus prompt sqlplus / as sysdba They can be used to modify default prompt sqlplus / as sysdba
With the Partitioning, OLAP, Advanced AnalyticsĪnd Real Application Testing options" (CHAR) There are many predefined user variables in Oracle Database sqlplus / as sysdbaĭEFINE _CONNECT_IDENTIFIER = "ORA12C" (CHAR)ĭEFINE _SQLPLUS_RELEASE = "1201000200" (CHAR)ĭEFINE _O_VERSION = "Oracle Database 12c EnterpriseĮdition Release 12.1.0.2.0 - 64bit Production
This article shows how you can enhance it using sqlplus command SET SQLPROMPT and predefined user variables. Default sqlplus prompt is very simple once you connect to a database.