- Kiran Dalvi
- 05 Sep, 2023
- 0 Comments
- 3 Mins Read
Configure RMAN Recovery Catalog
Configure RMAN Recovery Catalog
RMAN recovery catalog Is another database which is on a separate server and which will save only the details of your backups in terms of metadata of the backup.
Whenever you trigger the backup, RMAN will Update the information in the control file. Your control files can store the backup details for the last 30 days only which is the default 30 days retention period.
Suppose you want to have the details of the backups which are taken before 30 days. The recovery catalog will help you in this case to store the history backup details.
Benefits of Recovery catalog :
- It helps in database recovery when you lose the control file
- You can write RMAN scripts in recovery catalog and save them
- You can use recovery catalog for backups reporting also
- You can store RMAN scripts in recovery catalog
- Cloning with PITR (Point in time recovery) becomes easier as the recovery catalog knows which Control file is required
- Store long term backup historyÂ
Â
Â
Importance of Recovery Catalog :
- RMAN stores the backup information into the control file
- If we lose control file, we lose all the backup information
- Even though the backups are available, they are not usable. If you lose the control file, the backups are of no use as Oracle or RMAN doesn’t know which backup belongs to which database. The reason behind this is the information is stored in the control file which you lost.
To resolve all the above three issues, we use recovery catalog.
- Recovery catalog is a separate database that stores backup information
- One recovery catalog can store multiple target database backup information
You don’t have to create multiple recovery catalog for multiple target databases. You can create one recovery catalog database for all the databases or servers
Recovery catalog configuration :Â
Follow the steps to configure RMAN recovery catalog on a seperate machine.-
- Create a default tablespace under prim database which will be used for backup information storage
SQL> create tablespace rmantbs datafile '/u01/app/oracle/oradata/prim/rmantbs01.dbf' size 50mb;
- , Create a user which will be used to connect recovery catalog and store backup information. We will create the user testuser to connect to the recovery catalog. This user testuser will store the information into rmantbs tablespace.
SQL> create user testuser identified by testuser default tablespace rmantbs temporary tablespace temp; Grant permissions to testuser user SQL> grant connect,resource,recovery_catalog_owner to testuser;
- add tns entry details of catalog server on target server.
prim = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.50)(PORT = 1521) ) (CONNECT_DATA = (SERVICE_NAME = prim) ) )
rman catalog testuser/testuser@prim RMAN> create catalog;
rman target / catalog testuser/testuser@primWe need to register our target database to the recovery catalog database. Use below command to register target database into catalog database:
RMAN> register database;You can see the statement in the above screenshot: starting full resync of recovery catalog. It means that whatever backup information available in the proddb file is now updated also in the recovery catalog. Full resync complete means that your control files backup information and the recovery file backup information are updated.