If the Mirror Replication Agent configuration file is deleted or damaged, the Mirror Replication Agent instance cannot start correctly, and it will immediately shut down.
When the Mirror Replication Agent configuration file is deleted or damaged, you have two options for recovery:
Copy the default configuration file to the Mirror Replication Agent instance directory and then re-create the missing configuration items.
Delete the Mirror Replication Agent instance, create a new instance, and then go through the setup process to re-create the configuration.
You can use the information recorded on the “Installation
and Setup Worksheet” in the Mirror Replication Agent Installation
Guide to re-create a Mirror Replication Agent configuration file.
Use the following procedure to recover from a damaged or missing Mirror Replication Agent configuration file by copying the default configuration and re-creating the missing items.
To recover from a missing Mirror Replication Agent configuration
file
Make sure the Mirror Replication Agent instance is shut down. If it is not, use the shutdown command to terminate the Mirror Replication Agent instance.
Copy the default Mirror Replication Agent configuration file (such as mra.cfg) from the MRA-12_6\config directory to the Mirror Replication Agent instance directory.
For example, if the Mirror Replication Agent instance is named “my_mra,” you would use the following command at the operating system prompt in the Mirror Replication Agent installation directory to copy the default Mirror Replication Agent configuration file:
copy config\mra.cfg my_mra\my_mra.cfg
Start the Mirror Replication Agent instance using the following command at the operating system prompt:
mra -i inst_name
where inst_name is the name of the Mirror Replication Agent instance you want to start.
Log in to the Mirror Replication Agent administration port using the following command at the operating system prompt:
isql -Usa -P -Sinst_name
where inst_name is the name of the Mirror Replication Agent instance you want to administer.
Use the ra_config command to set the log directory for the Mirror Replication Agent instance:
ra_config log_directory, logpath
where logpath is the full path specification.
The following example is the path specified automatically when the Mirror Replication Agent instance is created:
C:%SYBASE%\MRA-12_6\inst_name\log\
where:
%SYBASE% is the path to the Mirror Replication Agent installation directory.
inst_name is the name of the Mirror Replication Agent instance.
Use the ra_set_login command to reset the administrative user ID and password for the Mirror Replication Agent instance:
ra_set_login mra_admin_user, mra_admin_pwd
where:
mra_admin_user is the Mirror Replication Agent administrator login.
mra_admin_pwd is the corresponding password.
Use the ra_config command to set the values of the following Mirror Replication Agent configuration parameters for the primary database:
pds_database_name pds_datasource_name pds_host_name pds_password pds_port_number pds_server_name pds_username
Use the ra_config command to set the values of the following Mirror Replication Agent configuration parameters for the Replication Server:
rs_host_name rs_password rs_port_number rs_source_db rs_source_ds rs_username
Use the ra_config command to set the values of the following Mirror Replication Agent configuration parameters for the RSSD:
rssd_database_name rssd_host_name rssd_password rssd_port_number rssd_username
Use the shutdown command to shut down the Mirror Replication Agent instance so you can re-start the Mirror Replication Agent instance with the correct administrative user login:
shutdown
Start the Mirror Replication Agent instance using the following command at the operating system prompt:
mra -i inst_name
where inst_name is the name of the Mirror Replication Agent instance you want to start.
Log in to the Mirror Replication Agent administration port using the following command at the operating system prompt:
isql -Umra_admin_user -Pmra_admin_pwd -Sinst_name
where:
mra_admin_user is the Mirror Replication Agent instance administrator login.
mra_admin_pwd is the password.
inst_name is the name of the Mirror Replication Agent instance.
Use the ra_status command to verify that the Mirror Replication Agent instance is in Admin state:
ra_status
Use the test_connection command to verify that the Mirror Replication Agent instance can communicate with the primary data server, the Replication Server, and the RSSD:
test_connection
Use the resume command to put the Mirror Replication Agent instance into Replicating state:
resume
Use the ra_status command to verify that the Mirror Replication Agent instance is in Replicating state:
ra_status
If the Mirror Replication Agent instance successfully enters Replicating state, then the information stored in the configuration file is correct for that Mirror Replication Agent instance.
If the Mirror Replication Agent instance remained in Admin state after you invoked the resume command, then you still need to verify and correct the following items:
Configuration parameters for the primary database (see step 7 in the previous procedure)
Configuration parameters for the Replication Server (see step 8 in the previous procedure)
Configuration parameters for the RSSD (see step 9 in the previous procedure)