Reset database id so that it can be backed up if the same DBID already exists in RMAN catalog
for a different database.
SVRMGR> alter database backup controlfile to trace resetlogs;
SVRMGR> shutdown immediate;
SVRMGR> startup mount;
SVRMGR> select dbid , name from v$database ;
DBID NAME
---------- ---------
673658548 MYDB
SVRMGR> execute dbms_backup_restore.zeroDbid(0);
SVRMGR> shutdown normal;
Rename the trace file to rename_db.sql
Edit file rename_db.sql remove comments and extra stuff and replcate
REUSE DATABASE
with the following
REUSE SET DATABASE
SVRMGR> connect internal;
SVRMGR> @ /apps/oracle/admin/MYDB/udump/rename_db.sql
SVRMGR> select dbid , name from v$database ;
DBID NAME
---------- ---------
1921805231 MYDB
|