In this document I’m renaming the instance name “TEST” as “DEV”:
- Check the instance name before we rename
SQL>Select instance_name from v$instance;
instance_name
--------------------
TEST
- Shutdown the instance which we desired to rename.
SQL>shutdown immediate
Note: Database must be shutdown with SHUTDOWN NORMAL or SHUTDOWN IMMEDIATE.
- Modify the files profile, oratab, tnsnames.ora, listener.ora with the new ORACLE_SID.
- Go to cd $ORACLE_HOME/dbs/ and modify the initDEV.ora with the new instance_name.
vi initDEV.ora
Instance_name=DEV
- Recreate the password file with the new sid.
$Orapwd file=$ORACLE_HOME/dbs/orapwDEV password=xxx
- Export ORACLE_SID=DEV
- Start up the database and verify that it works.
SQL>startup
- 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