Normally, the primary database is the source of all data and transactions replicated in the Mirror Activator system. Re-materializing the primary database is required only as part of a failback procedure, to restore normal system operations after a failover.
After a failover event, the standby database becomes the “active” database, and the primary database must be re-materialized from the standby database to restore the normal operating condition, and resume replication from the primary database to the standby database.
When you re-materialize a primary database, the primary
database is the target and the standby database
is the source in the materialization procedure.
Table A-2 provides a checklist of the snapshot re-materialization tasks for a primary (target) database in Adaptive Server version 12.5.0.3.
The checklist in Table A-2 assumes that:
The primary (target) Adaptive Server is already installed, and configured identically to the standby (source) Adaptive Server.
The primary (target) database exists in the primary (target) Adaptive Server, and its database options and devices are configured identically to the standby (source) database.
All server logins defined in the standby (source) Adaptive Server exist in the primary (target) Adaptive Server, with identical suid values and names, and all server roles defined in the standby (source) Adaptive Server exist in the primary (target) Adaptive Server.
Task |
Description |
---|---|
1 |
Shut down the primary (target) Adaptive Server. |
2 |
Quiesce the standby (source) database to suspend all update activity. The standby (source) database will remain suspended during failback, until after the materialization procedure is complete for the primary (target) database. |
3 |
Use the disk replication system to copy a snapshot of all standby (source) database data and log devices to the primary (target) database devices. |
4 |
Start the primary (target) Adaptive Server to recover the primary (target) database and bring it online. |
After you complete the primary database re-materialization, you must perform additional tasks to complete the failback procedure. See Appendix B, “Failover and Failback with Mirror Activator,” for more information about failback procedures.
Use the following procedure for snapshot re-materialization of a primary database in Adaptive Server version 12.5.0.3.
To re-materialize a primary database in ASE 12.5.0.3
Shut down the primary (target) Adaptive Server using the shutdown command.
Quiesce the standby (source) database to suspend all update activity.
Log in to the standby (source) Adaptive Server with a System Administrator user role, and execute the following command:
quiesce database MA_setup hold sdb
where:
MA_setup is a user-defined tag that identifies the database.
sdb is the name of the standby (source) database.
The standby (source) database will remain suspended
during failback, until after the materialization procedure is complete
for the primary (target) database.
Using the disk replication system facilities:
Capture a snapshot (or point-in-time) image of all of the standby (source) database data and log devices
Transfer the snapshot to the primary (target) database devices you initialized in the primary (target) Adaptive Server
While the standby (source) database is suspended during failback, you must also:
Transfer the snapshot of the standby (source) database log devices to the mirror log devices
Configure the disk replication system for synchronous replication from the primary (target) log devices to the mirror log devices (to prepare for normal system operation after failback)
Refer to the documentation provided by your disk replication system vendor for more information about the procedures in this step.
Start the primary (target) Adaptive Server to recover the primary (target) database and bring it online.
Open an operating system command prompt window on the primary Adaptive Server host, and use the RUN script to start the primary Adaptive Server:
$SYBASE/ASE_12-5/install/RUN_pds
where:
$SYBASE is the path to the Adaptive Server installation directory.
pds is the name of the primary Adaptive Server.
The primary data server will start up in “recovery” mode, and it may take a while for the primary database to come online.