|
Gone are the days when companies relied on a single data center for all IT infrastructure needs. The need for high availability of applications and services along with business loss incurred with computer outages has prompted all major organizations to build more than one data center in geographically dispersed places. This strategy will also help to prevent outages from natural calamities, power outages, and human interventions. The common IT infrastructure consists of three major parts - hardware, software and applications, and networking. Hardware is protected by a host of methods, including mirroring, RAID technologies, real-time backup, and replication. Networking is stabilized by load balancing and switching between various networks. For applications that rely on Oracle databases, there are a few proven methods to provide high availability. Real Application Clusters (RAC), Data Guard, use of Oracle scripts, and third-party replication software are the common methods for providing high availability to Oracle databases.
Oracle Data Guard provides data protection, disaster recovery, and high availability to databases. Data Guard maintains a primary database, which is available all the time and one or more standby databases, which are copies of the primary database. When the primary database becomes unavailable, Data Guard can switch any standby database to the primary role and let the network divert user connections to the new database. This minimizes downtime associated with outages. The databases are connected by Oracle Net and can stay on the same server, same location, or diverse locations. DBA can manage primary and standby databases using Data Guard broker interfaces or SQL command line.
The primary database in an Oracle Data Guard configuration can be a single Oracle instance or an Oracle RAC database. The maximum number of standby databases supported until Oracle Database 11g is nine. Similarly, the standby database can be a single instance database or an Oracle RAC database.
We can have two major types of standby databases - physical standby or logical standby. A physical standby database is an identical copy of the primary database on a block-by-block structure. It is synchronized with the primary database by the redo apply process. In Oracle 11g, a physical standby database can receive and apply redo, while the database is open for read-only access. This helps organizations by making a separate database available for daytime reporting purposes. A logical standby, on the other hand, has the same logical information as the primary database, but the physical structure can be different. The logical standby is synchronized with the primary by the SQL Apply process, which applies data in redo as executed SQL statements. The logical standby database can be used for reporting and for use during database upgrades.
Oracle Database 11g provides another version of standby called the snapshot standby database. This is a fully updatable standby database created by converting a physical standby database into a snapshot standby database. Similar to physical or logical standby databases, a snapshot standby database receives and archives redo data from the primary. But, it does not apply the redo data that it receives, until the snapshot standby is converted back into a physical standby database. This is useful where a temporary snapshot of a physical standby database is needed.
An Oracle database operates only in primary or standby role. With Data Guard, the role of a database can be changed using a switchover or a failover operation. Switchover is merely a role reversal between the primary database and a standby database. This will not result in any data loss, as in planned maintenance of the primary database. During a switchover, the primary database becomes the standby database and the standby database transitions to the primary. We resort to a failover operation when the primary database becomes unavailable. The failover results in a role transition of a standby database to the primary database role. The DBA can configure Data Guard to ensure zero data loss. These role transitions can be invoked manually using SQL statements, using Oracle Data Guard broker, or the DGMGRL command-line interface.
You can set up Oracle Data Guard to offer various levels of protection to address different requirements. There are maximum availability, maximum protection, and maximum performance modes. With Data Guard, your operational databases get data protection, disaster recovery, and high availability. Using a combination of standby databases and an appropriate level of protection, your information store will be able to support demanding business needs.
About the Author:
Dr. Arun Kumar R., data architect at Cingular Wireless, has over a decade of experience in Oracle technologies. He has authored two Oracle Database 10g books and over 50 technical papers. He can be reached at arundbta@dbatrends.com.
|