Friday 20 September 2013

RMAN Catalog Configuration

                    There are couple of ways, we can setup the RMAN. We can use control file to store backup catalog information or we can have separate database to store catalog information. The CONTROL_FILE_RECORD_KEEP_TIME initialization parameter controls how long backup records are kept in the control file before those records are re-used to hold information about more recent backups. By default this parameter set to 7 days.


Benefits of using RMAN:

  •     Minimize the possibility of human error
  •     Simple command interface
  •     Manage the complexity of backup and recovery operations
  •     Unused block compression lets you skip unused data blocks, thus saving space and time.
  •     RMAN can be fully automated
  •     Make backups scalable and reliable
  •     Supports high-speed incremental backups
  •     Can perform error checking when backing up or during recovery
  •     Can perform image copies which are similar to operating system backup
  •     Can be used with 3rd party backup management software like Veritas Netbackup
  •     It is well integrated into OEM, so you can make use of Oracle's scheduler

   
RMAN terminology:

Backup piece: operating system file containing the backup of a data file, controlfile, etc
Backup set: logical structure that contains one or more backup pieces, all relevant backup pieces are contained in a backup set
Image copy: similar to operating system copies like cp or dd, they will contain all block if not used
Channel allocation: Channel allocation is a method of connecting rman and the target database while also specifying the type of backup i.e. disk or tape, they can created manually or automatically.


The Recovery Catalog:

RMAN will use the controlfile on the target database to store repository information regarding any backups for that server, this information can also be stored in a recovery catalog (optional) which resides on a rman server its own database which is dedicated to RMAN, information is still written to controlfile even if a recovery catalog is used.


RMAN Catalog Configuration:
To configure RMAN catalog follow the below steps



1: Source Database Must be in Archivelog mod:
            If source database is not in Archivelog mod. Configure the database in archivelog mod.
To check wether your database is in archivelog or no archivelog mod you can run following commands.

SQL> SELECT log_mode FROM v$database;

or you can confirm it by runnig following command.

SQL> ARCHIVE LOG LIST



2: Create a new database for the catalog : catdb



3: Configure listener on Source database:


4: Configure tns entery on catalog database: catdb



5: create rman "rman_user" user on source database:


6: create tablespace on catalog database: catdb

CREATE TABLESPACE rman
DATAFILE '/u02/oradata/rman/rman01.dbf' size 150m;


7: Create user and give default tablespace the one we created above. catdb

CREATE USER rman IDENTIFIED BY rman
DEFAULT TABLESPACE rman
QUOTA UNLIMITED ON rman;



7: Grant connect, resource, recovery_catalog_owner to the catalog user:

SQL> GRANT connect, resource, recovery_catalog_owner TO rman;

Here the role "RECOVERY_CATALOG_OWNER" provides the user with all privileges required to maintain and query the recovery catalog.


8: create password file on Source database:

9: connect to rman on catalog database: catdb

 $rman target /


10: create catalog: catdb

rman>create catalog;


11: connect to target database: catdb

$rman target rman_user/passwd @tns(tns filename) catalog rman/rman


12: then register the database: catdb

rman>register database



Make sure that the registration was successful by running REPORT SCHEMA:
RMAN> REPORT SCHEMA;

The following command will show you all the configuration of rman.

 rman>show all;









No comments:

Post a Comment

Ask your Questions....