Sunday 18 March 2012

Rman Problem and Solutions

Oracle DB: Connecting to Rcat (Recovery Catalog) using Rman

1. Problem: The Listener has been started and the target (orcl) database has been mounted and started . However when an attempt is made to connect to the Rcat database, as a user: rcatowner, using Rman at the linux prompt then there are problems doing so and a user gets the following error:

[   ~]$ rman target / catalog rcatowner@rcat

connected to target database: ORCL (DBID=**********)
recovery catalog database Password:
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04004: error from recovery catalog database: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

2. Impact: High  as the user cannot connect to the rcat database and hence cannot use the Rman (Recovery Manger) services.

3. Solution: Although the listener has been started and the target (orcl) database has been started and mounted the user cannot connect to rcat because the rcat database instance has not yet been started by the user. You can know this by the following line in the above error: "connected to target database: ORCL (DBID=**********)". Here it clearly indicates that the user is connected to the orcl database instance and not the rcat instance. Rcat database instance needs to be started because Rcat is a database like the target database.
Additional Info: Rcat is a database and comprises of Oracle tables and views which the RMAN (Recovery Manager) uses to store metadata and its (RMAN) repository information of one or more Oracle databases. RMAN utilises the metadata to manage the recovery, backup and restoring of the Oracle databases. Below are the steps that need to be followed:
Step #1:
[  ~]$ . oraenv
ORACLE_SID = [orcl] ? rcat

Step #2:
[   ~]$ sqlplus / as sysdba
  
Connected to an idle instance.

SQL> startup

ORACLE instance started.
Database mounted.
Database opened.

Step #3:
[  ~]$ rman target / catalog rcatowner@rcat

connected to target database: RCAT (DBID=*********)
recovery catalog database Password:
connected to recovery catalog database

Here : connected to target database: RCAT (DBID=*********) : clearly indicates that the user is connected to the Rcat database instance now.

Step #4:
 
[oracle@localhost ~]$ . oraenv
ORACLE_SID = [rcat] ? orcl


The ORACLE_SID needs to be changed back to orcl ie. the target database because if this is not done then the user would not be able to access the target database (orcl) as the system would only be recognizing the rcat database instance at this stage.


No comments:

Post a Comment