How to change or modify the SQLPlus prompt?

advertisements

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World
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?
  1. Prompt with Username, Connect String/dbname and date
SQL> SET SQLPROMPT "_USER'@'_CONNECT_IDENTIFIER _DATE> "
SYS@prod10 22-JUN-11>
  1. Prompt with username only
SET SQLPROMPT "_USER>"
SYS>
  1. Prompt with Connection identifier/database name
SYS>SET SQLPROMPT "_CONNECT_IDENTIFIER>"
prod10>
  1. Prompt with critical identifications
SET SQLPROMPT "Producion Critical>"
Producion Critical>

_____________________________________________________________________________________________________________________

Website Stats

0 comments:

Post a Comment

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-23 All Rights Reserved | Site Map | Contact | Disclaimer