Data Guard 11g Best Practice

Primary, Physical (redo apply) and Logical (SQL apply) Standby Databases or Active Data Guard
Post Reply
User avatar
Kristoff
Posts: 30
Joined: Thu Jan 19, 2012 2:17 pm
Location: Manila, Philippines

Data Guard 11g Best Practice

Post by Kristoff »

All databases:
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK CLEAR;
RMAN> CONFIGURE CHANNEL DEVICE TYPE SBT PARMS '<channel parameters>';


RMAN Configurations at the Primary Database

The following RMAN configurations are recommended at the primary database:
1. Connect RMAN to the primary database and recovery catalog and register to recovery catalog.
[oracle@dgprim primary /home/oracle]$ rman target /
[oracle@dgprim primary /home/oracle]$ rman target /

Recovery Manager: Release 11.2.0.3.0 - Production on Sat Feb 16 14:54:49 2013

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

connected to target database: PRIMARY (DBID=1637625361)
RMAN> connect catalog rman11/password@prim
RMAN> connect catalog rman11/password@prim

connected to recovery catalog database
RMAN> REGISTER DATABASE;

2. Configure the retention policy for the database as n days:
RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;

starting full resync of recovery catalog
full resync complete
new RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
Note: This configuration lets you keep the backups necessary to perform database recovery to any point in time within the specified number of days.
Use the DELETE OBSOLETE command to delete any backups that are not required (per the retention policy in place) to perform recovery within the specified number of days.

3. Specify when archived logs can be deleted with the CONFIGURE ARCHIVELOG DELETION POLICY command. For example, if you want to delete logs after ensuring that they shipped to all destinations, use the following configuration:
RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO SHIPPED TO ALL STANDBY;
RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO SHIPPED TO ALL STANDBY;

new RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO SHIPPED TO ALL STANDBY;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
If you want to delete logs after ensuring that they were applied on all standby destinations, use the following configuration:
RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY;

RMAN Configurations at a Standby Database Where Backups are Performed
The following RMAN configurations are recommended at a standby database where backups are done:
1. Connect RMAN to the standby database (where backups are performed) as target, and to the recovery catalog.
[oracle@dgstan standby /home/oracle]$ rman target /
[oracle@dgstan standby /home/oracle]$ rman target /

Recovery Manager: Release 11.2.0.3.0 - Production on Sat Feb 16 15:01:36 2013

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

connected to target database: PRIMARY (DBID=1637625361)
RMAN> connect catalog rman11/password@prim
RMAN> connect catalog rman11/password@prim

connected to recovery catalog database
2. Enable automatic backup of the control file and the server parameter file:
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;

new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored
3. Skip backing up datafiles for which there already exists a valid backup with the same checkpoint:
RMAN> CONFIGURE BACKUP OPTIMIZATION ON;
RMAN> CONFIGURE BACKUP OPTIMIZATION ON;

new RMAN configuration parameters:
CONFIGURE BACKUP OPTIMIZATION ON;
new RMAN configuration parameters are successfully stored
4. Configure the tape channels to create backups as required by media management software:
RMAN> CONFIGURE CHANNEL DEVICE TYPE SBT PARMS '<channel parameters>';
-or-
RMAN> CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';

5. Specify when the archived logs can be deleted with the CONFIGURE ARCHIVELOG DELETION POLICY command. Because the logs are backed up at the standby site, it is recommended that you configure the BACKED UP option for the log deletion policy.
RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO DISK;
RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO DISK;

old RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO SHIPPED TO ALL STANDBY;
new RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO DISK;
new RMAN configuration parameters are successfully stored
RMAN Configurations at a Standby Where Backups Are Not Performed
The following RMAN configurations are recommended at a standby database where backups are not done:

1. Connect RMAN to the standby database as target, and to the recovery catalog.
[oracle@dgstan standby /home/oracle]$ rman target /
[oracle@dgstan standby /home/oracle]$ rman target /

Recovery Manager: Release 11.2.0.3.0 - Production on Sat Feb 16 15:01:36 2013

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

connected to target database: PRIMARY (DBID=1637625361)
RMAN> connect catalog rman11/password@prim
RMAN> connect catalog rman11/password@prim

connected to recovery catalog database
2. Enable automatic deletion of archived logs once they are applied at the standby database:
RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY;

To Check All RMAN Parameters:
RMAN> show all;
RMAN> show all;

RMAN configuration parameters for database with db_unique_name STANDBY are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
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 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO DISK;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_standby.f'; # default
xaeresis
Posts: 196117
Joined: Wed Oct 04, 2023 2:39 pm

Re: Data Guard 11g Best Practice

Post by xaeresis »

сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтtuchkasсайтсайт
xaeresis
Posts: 196117
Joined: Wed Oct 04, 2023 2:39 pm

Re: Data Guard 11g Best Practice

Post by xaeresis »

Post Reply