change database name controlfiles after restore?

Data-Base picture Data-Base · Jul 12, 2012 · Viewed 57.8k times · Source

I have restored database with the name DB to another database called DB01

it is in STARTED status (not mounted) and it seems I can not change the name if it is not mounts, and I can not mount it because of the name, how to solve this issue if possible?

I have RMAN full backup from DB on my current server which hosting the database DB01 the initdb01.ora is ready and configured with DB01

what can I do next

nid did not help! it asks for the database to be mounted! which i can not mount it

ORA-01103: database name 'DB' in control file is not 'DB01'

Answer

steve picture steve · Jul 19, 2012

You need to recreate the controlfile. The best approach is to first execute the following command in the original databasr:

alter database backup controlfile to trace;

This creates a textfile in the trace directory. You need to change the file path to match the new database file locations and also change the db_name parameter.

Once the previous step has been completed start the new database in nomount and execute above file (BE SURE YOU ARE CONNECTED TO THE NEW DATABASE AND ALL THE FILE PATH POINT TO THE NEW DATABASE). This will create a new controlfile.