When ever RMAN takes backup it associate DB_UNIQUE_NAME with it.
If a backup file is not associated with any database, then the row describing it in the recovery catalog, shows null for the SITE_KEY column. By default, RMAN associates files with the target database where SITE_KEY is NULL.
Once you have cataloged the backup in the target database, then that backup is associated with the target database
In a Data Guard environment, you can offload the process of backing up control files, datafiles, and archived logs to the standby system. By doing this you minimize the effect of backups on the primary system. The backups taken in this way can be used to recover the primary or the standby database.
The standby database is a physical standby database, and backups are taken only on the standby database.
When you use the CONFIGURE command in conjunction with the FOR DB_UNIQUE_NAME option, then RMAN sets the CONFIGURE for the site-specific database, based on the DB_UNIQUE_NAME that was specified.
Following points are necessary :
- Standby database is physical standby database and backups are only taken from standby database.
- An RMAN recovery catalog is required so backup from standby can be restored to primary database.
- We must use spfile.
- DB_RECOVERY_FILE_DEST_SIZE and DB_RECOVERY_FILE_DEST must be configured.
- Flashback database must be on.
***You are not required to register standby database in recovery catalog. Oracle will understand that this is standby database (even though they share same dbid)
[oracle@PRIMARY admin]$ rman
Recovery Manager: Release 11.2.0.3.0 - Production on Thu Feb 27 01:57:43 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
RMAN> connect target /
connected to target database: PRIM (DBID=4131750714)
RMAN> connect catalog recomanager/rman@cata
connected to recovery catalog database
RMAN> register database ;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
NOTE : we can not register standby database in same because standby and primary database dbid is same.
[oracle@STANDY admin]$ rman
Recovery Manager: Release 11.2.0.3.0 - Production on Thu Feb 27 01:56:01 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
RMAN> connect target /
connected to target database: PRIM (DBID=4131750714)
RMAN> connect catalog recomanager/rman@cata
connected to recovery catalog database
RMAN> register database ;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of register command at 02/27/2014 01:56:39
RMAN-01005: Mounted control file type must be CURRENT to register the database
We need to configure following parameter on primary server :
RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 15 days ;
new RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 15 DAYS;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY ;
new RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
Configure the connect string for the primary database and all standby databases, so that RMAN can connect remotely and perform re synchronization when the
RESYNC CATALOG FROM DB_UNIQUE_NAME
command is used. When you connect to the target instance, you must provide a net service name.
RMAN> CONFIGURE DB_UNIQUE_NAME 'STANDBY' CONNECT IDENTIFIER 'STANDBY' ;
new RMAN configuration parameters:
CONFIGURE DB_UNIQUE_NAME 'STANDBY' CONNECT IDENTIFIER 'STANDBY';
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
RMAN> LIST DB_UNIQUE_NAME OF DATABASE;
List of Databases
DB Key DB Name DB ID Database Role Db_unique_name
------- ------- ----------------- --------------- ------------------
517 PRIM 4131750714 PRIMARY PRIM
517 PRIM 4131750714 STANDBY STANDBY
We need to configure following parameter on standby server :
RMAN> CONFIGURE BACKUP OPTIMIZATION ON ;
new RMAN configuration parameters:
CONFIGURE BACKUP OPTIMIZATION ON;
new RMAN configuration parameters are successfully stored
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON ;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/data/backup/%U' ;
new RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/data/backup/%U';
new RMAN configuration parameters are successfully stored
RMAN> connect target sys/mayank@prim
connected to target database: PRIM (DBID=4131750714)
RMAN> connect catalog recomanager/rman@cata
connected to recovery catalog database
RMAN> RESYNC CATALOG FROM DB_UNIQUE_NAME ALL ;
starting full resync of recovery catalog
full resync complete
resyncing from database with DB_UNIQUE_NAME STANDBY
No comments:
Post a Comment