Oratop
Oratop
Abstract
Every mission critical system should have a DR plan in place to provide business continuity. Though
disaster recovery systems require significant investment in storage, servers, network bandwidth, physical
space etc., the cost to the business of extended downtime or data loss is even greater. Finding a way to
utilize these mostly unused DR resources while they are in standby role can significantly increase your
return on investment (ROI) in standby systems.
April, 2008
Reproduction in any manner whatsoever without the written permission of Dell Inc. is strictly forbidden.
Trademarks used in this text: Dell, the DELL logo, PowerEdge and PowerVault are trademarks of Dell Inc.;
Intel and Xeon are registered trademarks of Intel Corporation; EMC, Navisphere, and PowerPath are
registered trademarks of EMC Corporation; Microsoft, Windows, and Windows Server are registered
trademarks of Microsoft Corporation; Oracle is a registered trademark of Oracle Corporation and/or its
affiliates.
Other trademarks and trade names may be used in this document to refer to either the entities claiming the
marks and names or their products. Dell Inc. disclaims any proprietary interest in trademarks and trade
names other than its own.
Therefore, Oracle Database 11g includes a new Data Guard feature “Snapshot Standby” that enables users
to significantly boost their ROI in DR systems by easily utilizing them for test purposes without
compromising data protection. If upgrading to Oracle 11g is not feasible at this time, users can now create
their own snapshot standby with manual procedures using Oracle Database 10g Release 2. This paper
outlines such a methodology.
Creating an Oracle Data Guard snapshot standby opens up new avenues for DBAs. Existing DR
infrastructure can be used for testing, performance turning or a benchmarking environment while
continuing to provide protection from disasters. Some of the benefits of using a snapshot standby for
testing are:
1. Identify the lun(s) that can be used in creating a diskgroup that serves as FRA. If you are using an
existing diskgroup that is already created, skip to step 5.
2. Create and mount a diskgroup in ASM that serves as the FRA. The Diskgroup can be created from
any node of the cluster.
$ export ORACLE_SID=+ASM1
$ sqlplus "/ as sysdba"
SQL> create diskgroup FRA '/u02/oradata/asm/lun4',
'/u02/oradata/asm/lun5' ;
SQL> alter diskgroup FRA mount ;
3. Check if the FRA diskgroup is mounted and note down the space available in this diskgroup.
$ export ORACLE_SID=+ASM1
$ sqlplus "/ as sysdba"
This example shows that you are adding ‘FRA’ diskgroup to “disk_groups” parameter that already
has ‘DATA’ and ‘ARCH’ assigned to it.
disk_groups = 'DATA', 'ARCH', 'FRA'
5. Make sure ORACLE_SID is pointing to the database instance. Enable archive log mode if the
database is not in archive log mode. It is a requirement for the database to be in archive log mode.
In this example, the archive log destination is the ARCH diskgroup in ASM.
6. Set FRA related initialization parameters. The following initialization parameters need to be set to
enable FRA.
DB_RECOVERY_FILE_DEST specifies the default location for the FRA. The FRA could
contain multiplexed copies of current control files and online redo logs, as well as archived redo
logs, flashback logs and RMAN backups. DB_RECOVERY_FILE_DEST_SIZE (in bytes)
specifies the hard limit on the total space to be used by target database recovery files created in the
FRA.
8. Shutdown and startup the database in MOUNT EXCLUSIVE mode to turn on Flashback database.
11. Flashback database log activity can be monitored using the following query:
12. Flashback database retention target details can be monitored using the following query:
Restore Point
Restore Point is an Oracle Database 10g feature that provides the ability to associate a user-defined name,
for example, TEST_NEW_FEATURE, with a point-in-time SCN number to establish a restore point that
can be used with Flashback database or Flashback table during recovery operations. A restore point can be
specified such that it guarantees the database can be recovered to a particular point-in-time and eliminates
the need to manually record an SCN or timestamp to use with Flashback database and Flashback table
operations. Beginning with Oracle Database 10g Release 2 a “Guaranteed Restore Point” ensures that the
database can be flashed back to that particular point-in-time regardless of the flashback retention target.
Advance Operations
Before opening the physical standby, planning is required to understand how long the standby will be in
read/write mode, the storage required to hold the archive logs generated by the primary database during this
time, and the time required to resynchronize the standby database once test operations are complete. It is
recommended to keep archivelogs on the disk to keep resynchronization time to a minimum. Metrics
provided by v$archived_log view can be used to calculate how long you can keep archivelogs on disk. It is
wise to pick a time when there is reduced activity on the primary.
Data Guard
The configuration used in this example is as follows:
Primary database Physical Standby database:
2-node 10gR2 (10.2.0.2) RAC ASM for all data 2-node 10gR2 (10.2.0.2) RAC ASM for all data
storage storage
Linux Linux
Data Diskgroup: DATA Data Diskgroup: DATA
Archivelog diskgroup: ARCH Archivelog diskgroup: ARCH
FlashRecoveryArea diskgroup: FRA FlashRecoveryArea diskgroup: FRA
Data Guard Broker enabled Data Guard Broker enabled
Note: The above example assigns archive logs to their own ASM disk group. Customary Oracle best
practices recommend that archive logs are also placed in the Flash Recovery Area such that they are
managed automatically by Oracle. Dell’s current preference is to manage them manually.
Figure 1 below shows a Data Guard environment that consists of a 2-node Primary, 2-node physical
standby and Data Guard Broker managing the configuration.
Requirements
The following requirements need to be met in order to create a snapshot standby.
• The Data Guard environment (a primary and a physical standby) needs to be Oracle 10.2.0.1 or
higher
• Primary and Standby databases need to be in archivelog mode (the default requirement for Data
Guard)
• Flash Recovery Area (FRA) is required on the standby database to implement flashback database.
Note that Oracle best practices recommend implementing an FRA and Flashback database on the
primary as well, though this is not required for the snapshot database operation described in this
paper.
• Primary and standby are in sync at the time of the test or the gap between primary and physical
standby is nominal
Snapshot Standby
The new Oracle Database 11g Feature, Data Guard 11g Snapshot Standby, automates the manual steps
described in this paper via a single Data Guard Broker command or a single mouse-click when using
Enterprise Manager Grid Control. In addition to automation, Data Guard 11g Snapshot Standby provides
continuous data protection; even while the snapshot standby database is open read-write.
Increase ROI on DR Infrastructure 9
Additional benefit is realized by using Snapshot Standby in combination with a second new Oracle
Database 11g feature called “Database Replay”. Database Replay allows you to capture the workload on a
production system that can be replayed many times on a test system. Database Replay provides the ability
to run production workloads that may include online and batch workloads in the non-production
environment. Database Replay enables you to assess the impact of a change by replaying the captured
production workload on the test system.
Replaying production workload on a test system that doesn’t have production data wouldn’t yield realistic
results. Snapshot Standby compliments Database Replay as it offers production data and production
infrastructure for testing. DBAs now have a full-blown production infrastructure at their disposal to test
their changes without the overhead of having to duplicate an entire application infrastructure.
2. Stop Data Guard Broker on the standby database. If Data Guard Broker is configured, the Broker
would restart the apply process when it is mounted. Setting the Data Guard Broker to FALSE
Increase ROI on DR Infrastructure 10
prevents this from happening. You don’t want the Data Guard Broker to attempt to start applying
redo during this operation.
3. Shutdown all non-applying standby instances on the Oracle RAC. Even though there may be
multiple instances on a Oracle RAC standby database, only one of the instances will be receiving
and applying the archived logs.
4. If there are no other cascading remote log destinations defined, ignore this step. If there are
cascading standby destinations defined, defer these log archive destinations. For example, if
log_archive_dest_3 is defined to send archive logs to another physical standby then defer that
shipping by;
5. Note down the time and SCN number (as a safety measure), cancel the recovery on the applying
instance and create a “Guaranteed Restore Point”
7. While the Physical Standby is open for read/write operations, redo shipping cannot continue. You
must defer the redo transport destination for the physical standby database. For example, if
log_archive_dest_2 is defined to send archive logs to the physical standby then defer that shipping
by,;
8. The archivelogs should be kept on-disk either on primary or on standby. If the archivelogs need to
be backed up and deleted, be advised that these archivelogs need to be restored after the physical
standby is back in recovery mode or else plan on using an incremental backup to synchronize the
physical standby database after it is reverted back to its original role.
11. If the standby was open for a long time, and the archivelogs are not available on disk either on the
primary or on the standby but they were backed up and deleted, you need to restore the
archivelogs to the standby or else use an incremental backup to synchronize the Physical standby
database.
12. If there were any cascading databases that were feeding off of this physical standby, re-enable
those destinations.
To protect data while in this state, and to accelerate the resynchronization process, an Archive Log
Repository can be created on the standby server. This will allow the primary database to continue shipping
current redo to the standby location, where it will be safely archived on disk, and available locally to the
Increase ROI on DR Infrastructure 12
standby database when the resynchronizations process is begun. For more details on creating and using an
Archive Log Repository, please refer to Oracle documentation in chapter 5 of the Oracle Data Guard
Concepts and Administration documentation for Oracle Database 10g Release 2 [4].
Additional benefit is realized by using Snapshot Standby in combination with a second new Oracle
Database 11g feature called “Database Replay”. Database Replay allows you to capture the workload on a
production system that can be replayed many times on a test system. Database Replay provides the ability
to run production workloads that may include online and batch workloads in the non-production
environment. Database Replay enables you to assess the impact of a change by replaying the captured
production workload on the test system.
Replaying production workload on a test system that doesn’t have production data wouldn’t yield realistic
results. Snapshot Standby compliments Database Replay as it offers production data and production
infrastructure for testing. DBAs now have a full-blown production infrastructure at their disposal to test
their changes without the overhead of having to duplicate an entire application infrastructure.
Ethernet Switches
(For Private Gigabit-only Switches N/A 2
Interconnect)
Raid Controllers
(Used for internal PERC 5/e, PERC 5/i 1 (Per Node) 1 (Per Node)
storage only)
All valid PowerEdge 2950
Internal Drive internal storage 73 Gig/node 73 Gig/node
configurations
Oracle 10g R2 10.2.0.1
Oracle Software & Enterprise Edition (Base) + Enterprise Edition RAC
Licenses Oracle Patchset 10.2.0.3
Red Hat Enterprise Linux 4
Operating System Update 4 + errata OR
Oracle Enterprise Linux 4.5
Recommended Dell Pro or Platinum Plus Enterprise Support
Support Contract
Notes:
1: Assumes there is no requirement for additional ports for other functions on the switch.
2: Two single port HBAs are recommended.
3: Assumes one NIC for public network, and two bonded NICs for private network.
Validated Servers
Notes
BIOS ESM/BMC Firmware
Model
PowerEdge Servers PE6950 1.3.5 v1.69
or or higher
higher
Don’t wait for Oracle Database 11g to be production in your shop. Use the steps outlined in this paper to
create your own snapshot standby using Data Guard 10g Release 2 today. Achieve maximum ROI on your
DR infrastructure by utilizing your standby systems as a ready-made test infrastructure having real
production data and performance characteristics. Most importantly, the increased accuracy of test results
will dramatically decrease business risk when changes must be made to your production environment.
References
1. Flashback Database
http://www.oracle.com/technology/deploy/availability/htdocs/Flashback_Overview.htm
2. Flash Recovery Area http://www.databasejournal.com/features/oracle/article.php/3446681
3. Flashback Database – additional information
http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/rpfbdb003.htm#sthref508
4. Data Guard Archive Log Repository – see section 5.2.1, Destination Types
http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/log_transport.htm