Tuesday, February 21, 2012

RMAN Setup

Setups in CATALOG database

Create a tablespace in catalog database and assign it to the user rman.

CREATE TABLESPACE CAT1 DATAFILE '/d04/oradata/catalog/rman.dbf' SIZE 100M AUTOEXTEND ON;

CREATE USER rman IDENTIFIED BY rman
DEFAULT TABLESPACE CAT1
TEMPORARY TABLESPACE TEMP QUOTA UNLIMITED ON CAT1;

grant connect,resource,recovery_catalog_owner to rman;

Type rman
RMAN> CONNECT CATALOG RMAN/RMAN
connected to recovery catalog database

RMAN> CREATE CATALOG;

recovery catalog created

Setups in TARGET database

create user backup_admin identified by backup_admin default tablespace users;

grant sysdba to backup_admin;

[oratest@oracle 11.1.0]$ rman target backup_admin/backup_admin@test catalog=rman/rman@catalog

Recovery Manager: Release 11.1.0.7.0 - Production on Tue Feb 21 23:39:22 2012

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

connected to target database: TEST (DBID=2072291809)
connected to recovery catalog database

RMAN> register database;

database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

RMAN> show all;

RMAN configuration parameters for database with db_unique_name TEST are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BZIP2'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/d03/oracle/TEST/db/tech_st/11.1.0/dbs/snapcf_TEST.f'; # default

RMAN commands

RMAN> show controlfile autobackup format;
RMAN> show exclude;
RMAN> show all;

RMAN> configure backup optimization clear;
RMAN> configure maxsetsize clear;
RMAN> configure default device type clear;

Following configurations could be done to get a whole database backup.

RMAN> configure default device type to disk;
RMAN> configure default device type disk backup type to copy;
RMAN> configure controlfile autobackup on;

 Oracle10g / 11g - Getting Started with Recovery Manager (RMAN) [ID 360416.1]

++ Merged Incremental Backup Strategies (Doc ID 745798.1)
++ Incrementally Updated Backup In 10G and higher (Doc ID 303861.1)
++ RMAN Fast Incremental Backups (Doc ID 262853.1)

++ Rman Fails to Find Level 0 Backup on Restore/Recovery of Incremental Backups (Doc ID 341861.1)
++  Encountered RMAN-03002 and RMAN-06091 when Deleting Obsolete Backups (Doc ID 567555.1)

No comments:

Post a Comment