Nov 17, 2009

Rename an Oracle instance

In this document I’m renaming the instance name “TEST” as “DEV”:

  1. Check the instance name before we rename
              SQL>Select instance_name from v$instance;
                       instance_name
                     --------------------
                        TEST
  1. Shutdown the instance which we desired to rename.
              SQL>shutdown immediate
              Note: Database must be shutdown with SHUTDOWN NORMAL or SHUTDOWN IMMEDIATE.
  1. Modify the files profile, oratab, tnsnames.ora, listener.ora with the new ORACLE_SID.
  2. Go to cd $ORACLE_HOME/dbs/ and modify the initDEV.ora with the new instance_name.
             vi initDEV.ora
                 Instance_name=DEV
  1. Recreate the password file with the new sid.
               $Orapwd file=$ORACLE_HOME/dbs/orapwDEV password=xxx
  1. Export ORACLE_SID=DEV
  2. Start up the database and verify that it works.
               SQL>startup
  1. When the instance is started, the control file is updated with the new ORACLE_SID i.e. "DEV".
               SQL>Select instance_name from v$instance;

                     instance_name
                     --------------------
                        DEV


No comments:

Post a Comment

Search This Blog