A single installation of the Mirror Replication Agent can support replication from multiple databases; however, one Mirror Replication Agent instance is needed for each ASE database to be replicated. This section describes how to prepare and create a Mirror Replication Agent for ASE instance:
To prepare for a Mirror Replication Agent instance
Determine the default settings you want.
By default, Mirror Replication Agent is configured to mark every user table in the primary database for replication, and to create a replication definition for every table marked.Although these settings may be reasonable for production environments, they may not be useful in a test or proof-of-concept environment, where only a subset of tables are being replicated. If automatic table marking or replication definition generation options are not wanted, change the settings of two Mirror Replication Agent configuration parameters: pdb_automark_tables and pdb_auto_create_repdefs.
For more information about the configuration parameters, refer to the Mirror Replication Agent Reference Manual.
Locate the sample resource file.
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 for ASE instance, allowing an instance to be removed and re-created.A sample resource file is located in the Mirror Replication Agent $SYBASE/MA-15_0/init/ase.rs directory.
To create a Mirror Replication Agent instance
Go to the $SYBASE/MA-15_0/init directory.
Create an instance resource file. Copy the resource file template $SYBASE/MA-15_0/init/ase.rs file to another file that contains the configuration information for a new instance:
cp ase.rs myma.rs
Using a text editor, change the values assigned to the properties listed in Table 1-1:
Parameter |
Description |
Example values |
---|---|---|
instance name |
Any valid name. |
myma |
admin_port |
Port number that Mirror Replication Agent will use. |
20000 |
disable_rat |
Disable Replication Agent thread. |
yes |
initialize_instance |
Initialize the Mirror Replication Agent instance. |
yes |
pds_host_name |
Machine (host) where ASE is installed. |
repit |
pds_port_number |
Port number for ASE. |
5600 |
pds_database_name |
Name of database replicated from the primary data server. |
foo |
pds_username |
A valid user name that has “sa” and replicate roles. |
sa |
pds_password |
Password for pds_username. |
sa_ps
|
pds_sa_username |
System admin name. |
sa |
pds_sa_password |
System admin name password. |
sa_ps
|
ra_devicepath_1 |
Primary database log mirror location information. |
ra_devicepath_1= logA, /dev/pubs2/logA.dat |
rs_charset |
Character set that Replication Server is using.
|
iso_1 |
rs_host_name |
Machine where Replication Server is installed. |
repit |
rs_port_number |
Port where Replication Server is installed. |
11752 |
rs_username |
User ID that Mirror Replication Agent uses to access primary Replication Server; it must have CONNECT SOURCE and CREATE OBJECT capabilities. |
SAMPLE_RS_ra |
rs_password |
Password for rs_username. |
SAMPLE_RS_ra_ps |
rs_source_ds |
ASE server of the primary database. |
repit150i |
rs_source_db |
Primary database. |
foo |
rssd_host_name |
Machine where RSSD resides. |
repit |
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 |
start_instance |
Start the instance that was created. |
yes |
Validate and execute the new instance resource file:
$SYBASE/MA-15_0/bin/ma_admin.sh -vr myma.rs
where myma.rs is the path name of the resource file.
Validation results are returned as either:
Response_file processing completed, or
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.
After the resource file has been validated, allow the ma_admin utility to create the MRA instance:
$SYBASE/MA-15_0/bin/ma_admin.sh -r myma.rs
A message appears, indicating that response file processing is completed.
Using the example settings specified in the resource file, the Mirror Replication Agent will:
Stops disable, and preserve the secondary truncation point of the current ASE Mirror Replication Agent thread
Mark the primary database with sp_reptostandby
WARNING! If you have a large amount of text or image data in existing tables, the sp_reptostandby might take a long time to complete.
Read all the tables in the primary database and prepare them for replication
Initialize the Mirror Replication Agent