Tuesday, October 6, 2009

A standard UNIX prompt for Oracle users

Placing the following code snippet in your oracle user login file will give you a standard UNIX prompt that identifies your current server name, the database name you’re environment is set for (i.e. the value of your $ORACLE_SID UNIX variable), and your current working directory. This standard prompt makes it very easy to know where you are when navigating UNIX, and it also ensures that you know where you are located at all times.

#*****************************************************************
# Standard UNIX Prompt
#*****************************************************************
PS1="
`hostname`*\${ORACLE_SID}-\${PWD}
>"

This standardized Oracle UNIX prompt has the advantage of displaying the server name, the ORACLE_SID and the current directory. The best features of the standard command prompt is that it also places the command prompt on the next line so you can have a full 80 characters to type UNIX commands:

cheops*CCPRO-/home/oracle
>pwd

/home/oracle

cheops*CCPRO-/home/oracle
>cd /u01/oradata/CPRO

cheops*CCPRO-/u01/oaradata/CPRO
>

No comments:

Post a Comment