RMAN backup server switching your ORACLE_UNQNAME

Normally we set the ORACLE_UNQNAME setting in our bash_profile. But in my case I use the backup server to restore both production and stage backupsets for testing.  It is very easy to forget setting this environment variable. Therefore I decided to modify my oraenv file on just this server to :

#
# Install any “custom” code here
#
case “$ORACLE_SID” in
  (“LJPROD”) export ORACLE_UNQNAME=”LJPROD” ;;
  (“LJSTAGE”) export ORACLE_UNQNAME=”LJSTAGE” ;;
  esac

 

Granted if you set the ORACLE_SID to something not in your oratab file the unqname , and home will not be set, but this would be the case with no changes to the default environment. Seems there are a lot of posts about this subject in a RAC environment but not mentioned often when using Data Guard and or RMAN.

Let me know your thoughts on this, any best practices, and if you have done something similar for your environments.

This entry was posted in Oracle. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s