Put your tips and tricks online - Share your knowledge! Login | Register
 
 
  Search     Advanced search
 

Home | Ask Question | Add tip | Questions | My tips | Recent tips & tricks | Suggest a category | FAQ | Forums

 
 
 
 Category : Home > Databases > Oracle     

Reset DBID


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



  Options
 
   del.icio.us  |  newsvine  |  digg  |  furl  |  google  |  yahoo  |  Ma.gnolia  |  vigillar  |  reddit  |  technorati  |  icerocket  |  pubsub

       Rate this tip:    

Start discussion or add comment to this tip

  Details
Tip reference : #2
views : 1359
Added on : 09/23/05
Submited by : h8dk97
 
Send a message Send a message Printer friendly output Printer friendly output
Display this member's tips Display this member's tips (149)
 
 
<< Previous
 Most viewed tips 
  Databases > Oracle > Security : How to unlock Oracle user account  
  Databases > Oracle > Performance Tuning : How to enable trace in Oracle  
  Databases > Oracle : Kill user session  
  Databases > Oracle : Scripts to backup Oracle database on Windows NT  
   
  All categories
Databases | Programming | Hardware | Operating Systems | Networking | Internet | ERP / CRM | Games & Multimedia | Graphics & Design | Miscellaneous | Office Software | TipLib FAQ
 
 

Home |  FAQ |  Terms of Use |  Privacy Policy

© 2005 tiplib.com