Customise Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorised as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.

No cookies to display.

RMAN-20002: Target Database Already Registered In Recovery Catalog

Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
  • User AvatarKiran Dalvi
  • 01 Dec, 2023
  • 0 Comments
  • 3 Mins Read

RMAN-20002: Target Database Already Registered In Recovery Catalog

PROBLEM:

While registering database to rman catalog, getting below error.

RMAN> register database;

RMAN-00571: ================================================
RMAN-00569: ========== ERROR MESSAGE STACK FOLLOWS ==========
RMAN-00571: ================================================
RMAN-03009: failure of register command on default channel at 12/08/2023 13:03:21
RMAN-20002: target database already registered in recovery catalog

Solution :

  1. Check dbid of the database.
    1
    2
    3
    4
    5
    SQL> select dbid from v$database;
     
    DBID
    ----------
    2017723764
2. Connect to catalog and check whether same db is present or not
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
sqlplus catalog_user/rman@catdb
 
SQL*Plus: Release 12.1.0.2.0 Production on Sun Feb 12 13:50:57 2023
 
Copyright (c) 1982, 2014, Oracle. All rights reserved.
 
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
 
SQL> select DB_KEY,DBID,NAME from rc_database where dbid=2023723764;
 
DB_KEY DBID NAME
---------- ---------- --------
29531 2023723764 CONTEST

We can see another database CONTEST is already present in the catalog with the same dbid.  so adding new database to catalog with same DBid is failing.

So fix it, we have two options now.


OPTION – 1: ( UNREGISTER EXISTING DBID ENTRY). If the database, for which same dbid exists in the catalog repository, it not in use , then we can remove the entry and try to register.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
sqlplus catalog_user/rman@catdb
 
 
SQL> select DB_KEY,DBID,NAME from rc_database where dbid=2023723764;
 
DB_KEY DBID NAME
---------- ---------- --------
29531 2023723764 CONTEST
 
SQL> EXECUTE dbms_rcvcat.unregisterdatabase(29531, 2023723764);
 
RMAN> register database;
 
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

OPTION 2 (CHANGE THE DBID of the database) : 

Use nid utility to change the dbid and try to register.

START DATABASE IN MOUNT STAGE :

1
2
3
4
5
6
7
8
9
10
11
12
13
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
 
Total System Global Area 1.1107E+10 bytes
Fixed Size 7644464 bytes
Variable Size 9294584528 bytes
Database Buffers 1711276032 bytes
Redo Buffers 93011968 bytes
Database mounted.
NID TOOL TO CHANGE DBID:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
nid target=sys/oracle@DBATEST
 
DBNEWID: Release 12.1.0.2.0 - Production on Sun Feb 12 14:03:42 2023
 
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
 
Connected to database DBATEST (DBID=2023723764)
 
Connected to server version 12.1.0
 
Control Files in database:
/archive/NONPLUG/NONCDB/control01.ctl
/archive/NONPLUG/NONCDB/control02.ctl
 
Change database ID of database NONCDB? (Y/[N]) => Y
 
Proceeding with operation
Changing database ID from 1742085976 to 1753637695
Control File /archive/NONPLUG/NONCDB/control01.ctl - modified
Control File /archive/NONPLUG/NONCDB/control02.ctl - modified
Datafile /archive/NONPLUG/NONCDB/system01.db - dbid changed
Datafile /archive/NONPLUG/NONCDB/sysaux01.db - dbid changed
Datafile /archive/NONPLUG/NONCDB/NONCDB/datafile/o1_mf_prim_d9v1bqq3_.db - dbid changed
Datafile /archive/NONPLUG/NONCDB/PLUG/prim01.db - dbid changed
Datafile /archive/NONPLUG/NONCDB/NONCDB/datafile/o1_mf_prim_d9v1fq7k_.db - dbid changed
Datafile /archive/NONPLUG/NONCDB/PLUG/undo_new01.db - dbid changed
Control File /archive/NONPLUG/NONCDB/control01.ctl - dbid changed
Control File /archive/NONPLUG/NONCDB/control02.ctl - dbid changed
Instance shut down
 
Database ID for database DBATEST changed to 1753637695.
All previous backups and archived redo logs for this database are unusable.
Database is not aware of previous backups and archived logs in Recovery Area.
Database has been shutdown, open database with RESETLOGS option.
Succesfully changed database ID.
DBNEWID - Completed succesfully.
OPEN DATABASE IN RESETLOGS:
1
2
3
4
5
6
7
8
9
10
11
12
SQL> startup mount
ORACLE instance started.
 
Total System Global Area 1.1107E+10 bytes
Fixed Size 7644464 bytes
Variable Size 9294584528 bytes
Database Buffers 1711276032 bytes
Redo Buffers 93011968 bytes
Database mounted.
SQL> alter database open resetlogs;
 
Database altered.

Now try to register:

1
2
3
4
5
RMAN> register database;
 
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

Hope It Helps!