Creating a recovery catalog
Hello folks,
Today I will show you how to create a recovery catalog. If you have more than one databases to manage, you want to keep the backup information of your databases for a long time the recovery catalog might be justified. You can register an unlimited numbers of databases into the recovery catalog.
Connect to SQLPLUS with SYSDBA:
[felipe@db1 ~]$ sqlplus / as sysdba SQL> create tablespace rman datafile ‘+data’ 2 size 150m autoextend on;
Tablespace created.
Now we are creating the owner of the recovery catalog.
SQL> create user rman identified by rman default tablespace rman quota unlimited on rman;
User altered.
SQL> grant recovery_catalog_owner to rman; Grant succeeded.
The role recovery_catalog_owner includes the systems priveliges below:
- ALTER SESSION
- CREATE CLUSTER
- CREATE DATABASE LINK
- CREATE PROCEDURE
- CREATE SEQUENCE
- CREATE SESSION
- CREATE SYNONYM
- CREATE TABLE
- CREATE TRIGGER
- CREATE TYPE
- CREATE VIEW
Now that the RMAN account exist, log into the catalog and initialize the repository with the CREATE CATALOG command:
[felipe@srv1 ~]$ rman catalog rman/rman@rcat
RMAN> create catalog; recovery
catalog created
RMAN>
The command below will register the database into the recovery catalog.
For each database that you have, you can register into the RMAN repository
[felipe@srv1 ~]$ rman target / catalog rman@rcat
connected to target database: PROD11G (DBID=9043318517) recovery catalog database Password: ********** connected to recovery catalog database
RMAN> register database;
database registered in recovery catalog starting full resync of recovery catalog full resync complete RMAN>
All metadata from your backups will be stored into the RMAN repository. In case that perform backups without connect with recovery catalog, you can do a resync with command below:
[felipe@srv1 ~]$ rman target / catalog rman@rcat
connected to target database: PROD11G (DBID=9043318517) recovery catalog database Password: ********** connected to recovery catalog database
RMAN>resync catalog;
starting full resync of recovery catalog full resync complete
RMAN>
Cheers
Felipe
Publicar comentário