advertisements
_____________________________________________________________________________________________________________________
Suppose if are working on multiple environments at a time, there are chances of command execution mistakes like executing the development database commands to production sqlplus prompt. To avoid such kind of confusions, it is better to set the sqlplus command prompts in different.
Where you need to modify?
There is one file glogin.sql in $ORACLE_HOME/sqlplus/admin/directory. This file executes when you connect to the sqlplus. Modifing the glogin.sql file is the permanent way to make change for prompt. You can use below mentioned formats also to modify the prompt for temporarily.
What are the different formats?
- Prompt with Username, Connect String/dbname and date
SQL> SET SQLPROMPT "_USER'@'_CONNECT_IDENTIFIER _DATE> "
SYS@prod10 22-JUN-11>
- Prompt with username only
SET SQLPROMPT "_USER>"
SYS>
- Prompt with Connection identifier/database name
SYS>SET SQLPROMPT "_CONNECT_IDENTIFIER>"
prod10>
- Prompt with critical identifications
SET SQLPROMPT "Producion Critical>"
Producion Critical>
_____________________________________________________________________________________________________________________
0 comments:
Post a Comment