Materializing the standby database is one of the tasks required to set up the Mirror Activator system. Therefore, the following Mirror Activator system setup tasks (which are not strictly materialization tasks) must be performed during the standby database materialization procedure:
Materialize the mirror log devices at the standby site, and set up the disk replication system for synchronous replication to the mirror log devices
Initialize the Mirror Replication Agent
The snapshot materialization procedure mentions these setup tasks, but it does not describe them in detail. See “Setting up a new Mirror Activator system” for detailed information about Mirror Activator system setup tasks.
Before you materialize a standby
database, you must create the Replication Server database objects
in the primary database, and then initialize the primary database
using the Mirror Replication Agent pdb_init command. See “Setting up a new Mirror Activator system” for more information.
Table A-1 provides a checklist of the snapshot materialization tasks for a standby database in Adaptive Server version 12.5.0.3.
The checklist in Table A-1 assumes that the standby Adaptive Server is already installed, and configured identically to the primary Adaptive Server.
Task |
Description |
---|---|
1 |
In the standby Adaptive Server, create the same server logins and roles that are defined in the primary Adaptive Server. |
2 |
In the standby Adaptive Server, create an empty (or shell) database, with the same data and log devices, database name, and database options as the primary database. |
3 |
Shut down the standby Adaptive Server. |
4 |
Quiesce the primary database to suspend all update activity. |
5 |
Use the disk replication system to copy a snapshot of all primary database data and log devices to the standby database devices. While the primary database is suspended during Mirror Activator system setup, you must also:
|
6 |
Resume update activity in the primary database after all procedures in step 5 are complete. |
7 |
Start the standby Adaptive Server to recover the standby database and bring it online. |
Use the following procedure for snapshot materialization of a standby database in Adaptive Server version 12.5.0.3.
To materialize a standby database in ASE 12.5.0.3
In the standby Adaptive Server, create all server logins and roles defined in the primary Adaptive Server.
Create an empty (or shell) database in the standby Adaptive Server.
Initialize the standby database data and log devices in the standby Adaptive Server, using the same disk init options as the primary database devices in the primary Adaptive Server. For example:
disk init name = "pdb_data", physname = "data_dev", size = "dddM"
where:
pdb_data is the device name used in the primary Adaptive Server.
data_dev is the path to the device in the standby Adaptive Server.
ddd is the size of the device, in megabytes, in the primary Adaptive Server.
The only device options that can be different between
the primary and standby servers are the paths to the physical devices.
All other device options must be identical on the primary and standby servers.
Create the standby database in the standby Adaptive Server, using the same create database options as the database in the primary Adaptive Server. For example:
create database pdb on pdb_data = "dddM" log on pdb_log = "lllM"
where:
pdb is the database name used in the primary Adaptive Server.
pdb_data is the database data device name used in the primary Adaptive Server.
ddd is the size of the database data device, in megabytes, in the primary Adaptive Server.
pdb_log is the database log device name used in the primary Adaptive Server.
lll is the size of the database log device, in megabytes, in the primary Adaptive Server.
Shut down the standby Adaptive Server using the shutdown command.
Quiesce the primary database to suspend all update activity.
Log in to the primary Adaptive Server with a System Administrator user role, and execute the following command:
quiesce database MA_setup hold pdb
where:
MA_setup is a user-defined tag that identifies the database.
pdb is the name of the primary database.
Using the disk replication system facilities:
Capture a snapshot (or point-in-time) image of all of the primary database data and log devices
Transfer the snapshot to the standby database devices you initialized in the standby Adaptive Server
While the primary database is suspended during Mirror Activator system setup, you must also:
Transfer the snapshot of the primary database log devices to the mirror log devices, and configure the disk replication system for synchronous replication from the primary log devices to the mirror log devices
Initialize the Mirror Replication Agent, using the ra_init command
See “Setting up a new Mirror Activator system” for more information about initializing the Mirror Replication Agent.
Refer to the documentation provided by your disk replication system vendor for more information about the procedures in this step.
Resume update activity in the primary database after all procedures in step 5 are complete.
You must initialize the Mirror Replication Agent before you
resume update activity in the primary database.
Log in to the primary Adaptive Server with a System Administrator user role, and execute the following command:
quiesce database MA_setup release
where MA_setup is a user-defined tag that identifies the suspended primary database.
Start the standby Adaptive Server to recover the standby database and bring it online.
Open an operating system command prompt window on the standby Adaptive Server host, and use the RUN script to start the standby Adaptive Server:
$SYBASE/ASE_12-5/install/RUN_sds
where:
$SYBASE is the path to the Adaptive Server installation directory.
sds is the name of the standby Adaptive Server.
The standby data server will start up in “recovery” mode, and it may take a while for the standby database to come online.