Please send your Questions & Answers or Feedback to "dvmadhavreddy@javabook.org"

Please send your Questions & Answers or Feedback to "mohan@javabook.org"

Renaming a database

Steps to rename a database :

1.take the backup of the control file to trace

2.shutdown the database

3.edit the trace file and change the database name

4.edit the parameter file and change the database name

5.startup nomount

6.execute the trace file

7.alter database open resetlogs;

 

SQL> shut immediate

oracle> vi cont.sql

                In the place of REUSE write SET and change the database name and save the file.

oracle> cd $ORACLE_HOME/dbs

oracle> vi initcrms.ora

                Set database_name=new database name and save it.

oracle> remove the control files

oracle>export ORACLE_SID=crms

                Remember that ORACLE_SID is the instance name not the database name.

oracle> sqlplus / as sysdba

oracle> startup nomount

SQL> @cont.sql

SQL> alter database open resetlogs;

SQL> select name,open_mode,log_mode from V$database;

SQL> select instance_name,status from V$instance;

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

Flag Counter