Serviceguard toolkit for Oracle Data Guard ‘Physical standby database’ and ‘logical standby database

Guest blog written by Kanakeshan K, Engineer, HPUX and OVMS RnD

Database restart is taxing, on resources and on productivity. If at all a failure happens, database (DB) like Oracle would involve restarting of the entire DB. Oracle Data Guard provides HA/DR for Oracle DB, however the time taken for role transition from primary DB to standby DB can be the bottleneck.

HPE Serviceguard for Linux (SGLX) toolkit for Oracle Data Guard (ODG) integrates and manages the ODG toolkit in Linux environment. SGLX’s ODG toolkit allows you to start, stop, and monitor the primary and standby Oracle DB. Each Oracle DB is configured in its own Serviceguard package and the database monitoring is taken care by SGLX Oracle toolkit. This toolkit is a two node solution where one node is running a primary DB and the other node is running a standby DB.

Automatic database role management

A role transition is the change of a database role from a standby DB to a primary DB, or from a primary DB to a standby DB using either a switchover or a failover operation. A Data Guard configuration consists of one production database and one standby databases.

The production database, also referred to as the primary database, functions in the primary role. This is the database that is accessed by most of your applications. The primary database is a single-instance Oracle database. A standby database is a transactional consistent copy of the primary database. Similar to the primary database, a standby database is also a single-instance Oracle database. HPE Serviceguard ODG toolkit supports both “physical standby database” and “logical standby database”.

  • Physical standby database — provides a physically identical copy of the primary database, with on disk database      structures that are identical to the primary database on a block-for-block basis. The database schema, including        indexes, are the same.
  • Logical standby database — contains the same logical information as the production database, although the            physical organization and structure of the data can be different.
  • The ODG toolkit also supports Active Data Guard configuration, which is the standby DB is open for read                  operations. The toolkit also supports all the three protection modes of ODG, such as maximum protection,                  maximum availability and maximum performance.

Failover: Recovery from a failure

As mentioned earlier, Serviceguard manages the primary and standby databases along with the Oracle Data Guard replication between them. When Serviceguard detects that the primary database is unavailable due to any failures (DB failure, node failure, site failure), a failover is initiated. This results in a transition of a standby database to the primary role. There Oracle Data Guard replication syncs the data from the primary to the standby instance and the DB can be recovered very quickly compared to a traditional restart of the DB on the secondary node. Serviceguard also provides capability to perform RPO sensitive failover that ensures a role transition is initiated only when the specified RPO is met.

Switchover: Planned maintenance

A switchover is a role reversal between the primary database and its standby database. A switchover ensures no data loss. This is typically done for planned maintenance of the primary system. This operation is initiated manually by putting the Serviceguard packages in maintenance mode. During a switchover, the primary database transitions to a standby role, and the standby database transitions to the primary role. The transition occurs without having to re-create either database.

Prerequisites

  • Two node Serviceguard cluster with DB configured as primary in one and as standby in the other node with               Oracle Data Guard replication set up between them.
  • If the ODG Broker is used, then FAST_START_FAILOVER feature must not be enabled when using the ODG               toolkit.
  • The primary and standby must be flashback databases.
  • The client application failover will not be handled or monitored by this solution, however the same can be                  deployed to coexist with this solution. Follow best practices as suggested by Oracle for client application                    configuration.
  • HPE Serviceguard Oracle toolkit

Download the 90-days free evaluation version of SGLX here.