Home > Administration > RMAN-07518: Reason: Foreign database file DBID: 18023747 Database Name: TEST

RMAN-07518: Reason: Foreign database file DBID: 18023747 Database Name: TEST

Very recently I have encountered this issue while cataloging the backup pieces in order to sync the standby server.

Well this is all about that database DBID is different from the source (primary) database where you cannot/rman cannot see those backups relevant to this destination database. very obvious thing.

This db in the issue has been built long back and in sync, whilst I was doing a roll forward standby recovery and trying to catalog found this issue.

Now, how to change the DBID to the desired or the original one,

we all know NID (new id) utility can only do database name change and NID change, but we cannot retrospect or keep the DBID we want to.

But wait, there is a packages  ( I believe this package is there since 9i) called dbms_backup_restore

Note : If you do not have this package you can run this{ORACLE_HOME}/rdbms/admin/dbmsbkrs.sql

which has following procedures (there‚Äôs lot of interesting stuff with this package) of interest for this issue. 

 

  • dbms_backup_restore.nidbegin
  • dbms_backup_restore.nidprocesscf
  • dbms_backup_restore.nidprocessdf
  • dbms_backup_restore.nidend;

Steps:-

1) Open database in readonly

2) Use the script below or use your own to change your ID

a) You should start with nidbegin

b) Change the controlfile first using dbms_backup_restore.nidprocesscf

c) change the datafiles using dbms_backup_restore.nidprocessdf , one by one or using a for loop to v$datafile

d) change the tempfiles using dbms_backup_restore.nidprocesscf, one by one or using a for loop to v$tempfile

e) End with dbms_backup_restore.nidbegin

 

May be undocumented usage of this package , please have proper backup before perform this activity

 

References:- http://psoug.org/reference/dbms_backup_restore.html

Simple Script:- http://www.pythian.com/news/1491/how-to-choose-your-oracle-database-id-dbid/

-Thanks

Suresh

About these ads
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

BigData - Oracle-info.com

Sureshgandhi's Blog : Its time to learn BigData

Oracle Alchemist

Steve Karam's Oracle Blog

ishudba

The King's .... "Joy of Life"..

the dba diary !!!

Naga's Blog : Oracle DBA experiences

ORACLE-INFO

Sureshgandhi's Blog: It's all about Oracle..Just Learn,Apply & Share.

SureshGandhi

All about Oracle.......

All about Oracle.......

DB Optimizer

database performance, SQL tuning and data visualizatoin

jarneil

The thoughts of Jason Arneil

All Things Oracle

All about Oracle.......

Dion Cho - Oracle Performance Storyteller

We are natural born scientists

All about Oracle.......

All about Oracle.......

All about Oracle.......

Miladin Modrakovic's Blog: Oraclue

Oracle internals, debugging and undocumented features

Coskan's Approach to Oracle

What I learned about Oracle

The Arup Nanda Blog

All about Oracle.......

OraStory

Dominic Brooks on Oracle Performance, Tuning, Data Quality & Sensible Design ... (Now with added Sets Appeal)

Martins Blog

Trying to explain complex things in simple terms

All about Oracle.......

Oracle database internals by Riyaj

Discussions about Oracle performance tuning, RAC, Oracle internal & E-business suite.

All about Oracle.......

Kevin Closson's Blog: Platforms, Databases and Storage

Platform, Database and Storage Topics

Iordan Iotzov's DBA blog

The opinions here may not necessarily reflect that of my employers - both past and present. The comments left by the reviewers are theirs alone and may not reflect my opinion. None of the advice is warranted to be free of errors and omissions. Please use at your own risk and after thorough testing in your environment.

Doug's Oracle Blog

All about Oracle.......

Oracle related stuff

All about Oracle.......

All about Oracle.......

Charles Hooper's Oracle Notes

Miscellaneous Random Oracle Topics: Stop, Think, ... Understand

Richard Foote's Oracle Blog

Focusing Specifically On Oracle Indexes, Database Administration and Some Great Music

Oracle E-Business Suite Technology

All about Oracle.......

Tanel Poder's blog: Responsible data management

Linux, Oracle, Exadata and Hadoop.

Oracle DBA - Tips and Techniques

Knowledge Is Power - Share IT ....

Guenadi N Jilevski's Oracle BLOG

Oracle RAC, DG, EBS, DR and HA DBA BLOG

Laurent Schneider

All about Oracle.......

Kerry Osborne's Oracle Blog

All about Oracle.......

Hemant's Oracle DBA Blog

All about Oracle.......

Oracle Enterprise Manager

All about Oracle.......

Structured Data

Thoughts on: Big Data, Hadoop, Databases, Platform, Performance & Scalability

Oracle Scratchpad

Just another Oracle weblog

Karl Arao's Blog

Just another weblog about Oracle,Linux,Troubleshooting,Performance,etc..etc..

The Data Warehouse Insider

All about Oracle.......

Online Apps DBA

One Stop Shop for Apps DBA's

All about Oracle.......

Microsoft SQL Server

All about Oracle.......

Follow

Get every new post delivered to your Inbox.

Join 83 other followers

%d bloggers like this: