Rename a oracle database [message #192127] |
Mon, 11 September 2006 02:17 |
barjunreddy
Messages: 8 Registered: August 2006 Location: Hyderabad
|
Junior Member |
|
|
Hi Gurus,
I Would like to rename the existing abc database as xyz. Could anyone tell me the steps to rename a database to the new name.
I tried the following steps
SQL>SELECT NAME FROM V$DATABASE;
ABC
SQL>ALTER DATABASE BACKUP CONTROLFILE TO TRACE;
DATABASE ALTERED;
SQL>SHOW PARAMETER USER_DUMP_
D:\oracle\admin\XYZ\udump
SQL>SHUTDOWN IMMEDIATE;
CD TO USER_DUMP DIRECTORY
Copied the Newly generated .trc file and copied the content of the trace file to the ABC_trace.sql and i modified the xyz_trace.sql file as
1. I renamed the Instance_name from abc to xyz.CREATE
2. CREATE CONTROLFILE REUSE DATABASE "ABC" RESETLOGS ARCHIVELOG
TO
CREATE CONTROLFILE REUSE DATABASE "ABC" NORESTLOGS ARCHIVELOG
I ran the xyz_trace.sql by just startup nomount state.
After that i renamed the instance,DB_names in the init.ora file of the xyz database.
SQL>ALTER DATABASE OPEN RESETLOGS;
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
Then after i dono what to do??
Regards,
Nagarjun
|
|
|
|
|
Re: Rename a oracle database [message #192221 is a reply to message #192127] |
Mon, 11 September 2006 08:03 |
Liza79
Messages: 74 Registered: September 2006
|
Member |
|
|
open that trace file, change the name of the database in the CREATE CONTROLFILE statement and copy it.
Then open your data base in nomount stage.
Execute the CREATE CONTROLFILE statement.
then ALTER DATABASE OPEN RESETLOGS.
Regards,
Liza
|
|
|
|
|
Re: Rename a oracle database [message #193934 is a reply to message #192127] |
Wed, 20 September 2006 00:41 |
Shamsher
Messages: 18 Registered: September 2006
|
Junior Member |
|
|
You need to recreate controlfile using "SET" option it will work.You use SET insist of Reuse or renaming the database.
ex
CREATE CONTROLFILE REUSE DATABASE "ABC" RESETLOGS ARCHIVELOG
CREATE CONTROLFILE SET DATABASE "ABC" RESETLOGS ARCHIVELOG
Regards
Shamsheer
|
|
|