A single installation of the Mirror Replication Agent can support replication from multiple databases. However, one Mirror Replication Agent instance is needed for each Microsoft SQL Server database that is to be replicated. This section describes how to prepare for and create a Mirror Replication Agent instance.
To configure and validate the Mirror Replication
Agent parameters in a resource file
Locate the resource file template.
The majority of configuration values required to create and initialize a Mirror Replication Agent can be recorded and stored in a resource file. Using it provides a means to record or retain the configuration information for a Mirror Replication Agent instance, allowing an instance to be removed and recreated.
The Microsoft SQL Server resource file template can be found at %SYBASE%\MA-15_1\init\mssql.rs.
Create an instance resource file.
Copy the resource file template %SYBASE%\MA-15_1\init\mssql.rs to another file. For example:
copy mssql.rs myma.rs
Using a text editor, change the values assigned to properties in the resource file so they match the values required for your environment. The majority of these values are host, port, user, and password information for the Microsoft SQL Server, Replication Server, and RSSD connections.
The resource file is self-documenting, with each parameter described. For more information, refer to the Mirror Activator Administration Guide, in Chapter 2, “Setup and Configuration,” the section titled, “Creating a Mirror Replication Agent instance using resource files.”
Parameter |
Description |
Example values |
---|---|---|
instance_name |
Any valid name |
myma |
admin_port |
Port number that Mirror Replication Agent uses. |
20500 (if in use, select a different port number) |
pds_server_name |
Name of the primary Microsoft SQL Server. |
TEAMSTER |
pds_port_number |
Port number for Microsoft SQL Server. |
1521 |
pds_dac_port_number |
Microsoft SQL Server Dedicated Administration connection port number. |
1348 |
pds_database_name |
Name of the primary database. |
pubs |
pds_username |
User ID that Mirror Replication Agent uses to access the primary data server. |
ra_user |
pds_password |
Password for pds_username. |
sybase |
create_pds_username |
Specifies whether or not the ma_admin utility, invoked without the -r option, should create the Mirror Replication Agent primary database user login if the login does not already exist in the primary data server. For information about the ma_admin utility -r option, see the Mirror Activator Administration Guide. |
yes |
rs_host_name |
Machine where Replication Server is installed. |
teamster |
rs_port_number |
Port where Replication Server is installed. |
11752 |
rs_username |
Replication Server user with CONNECT SOURCE and CREATE OBJECT capabilities. |
SAMPLE_RS_ra |
rs_password |
Password for rs_username. |
SAMPLE_RS_ra_ps |
rs_source_ds |
Valid name representing data server of primary Microsoft SQL Server database. |
mymrm |
rs_source_db |
Valid name representing primary Microsoft SQL Server database. |
pubs |
rs_charset |
Character set that Replication Server is using.
|
cp850 |
rssd_host_name |
Machine where RSSD resides. |
teamster |
rssd_port_number |
Port number where RSSD resides. |
11751 |
rssd_database_name |
Database name for RSSD. |
SAMPLE_RS_ERSSD |
rssd_username |
Valid user for RSSD. |
SAMPLE_RS_RSSD_maint |
rssd_password |
Password for rssd_username. |
SAMPLE_RS_RSSD_maint_ps |
ddl_username |
Identifies the database user name included in LTL for replicating DDL commands to the standby database. |
ddl_user |
ddl_password |
Identifies the password for ddl_username. |
The password you created previously |
start_instance |
Automatically start the instance that was created. |
yes |
initialize_instance |
Automatically initialize the new Mirror Replication Agent instance.
|
yes |
ra_devicepath_x |
Primary database log mirror location information. These parameter names must be unique in the format ra_devicepath_x, where x is a unique sequential number and the parameter value contains both the device name and the device path separated by a comma. |
ra_devicepath_1= logA, /dev/pubs2/logA.dat, or leave commented if not using mirrored log |
WARNING! The combined values of rs_source_ds and rs_source_db must match the “pds.pdb” values of the Replication Server primary connection name.
Be sure your CLASSPATH environment variable points to the Microsoft SQL Server JDBC driver, and use the Mirror Replication Agent ma_admin utility to validate the settings in the new instance resource file using the -vr parameter. For example:
%SYBASE%\MA-15_1\bin\ma_admin -vr myma.rs
Validation results are returned as one of the following:
Response-file processing completed
Response-file processing completed
with errors
If any validation fails, the ma_admin utility returns an error message and information about the failure. You can repeat the validation process as many times as necessary until it executes without error. No entities are changed or created because of this process.