Recovering from a lost configuration file

If the Replication Agent configuration file is deleted or damaged, the Replication Agent instance cannot initialize correctly upon start-up and will immediately shut itself down.

When the Replication Agent configuration file is deleted or damaged, you have two options for recovery:

NoteThe information you recorded on the “Sybase Replication Agent Installation Worksheet” can be used to re-create a damaged or missing Replication Agent configuration file.

Use the following procedure to recover from a damaged or missing Replication Agent configuration file by copying the default configuration and re-creating the missing items

StepsTo recover from a lost or missing Replication Agent configuration file

  1. Make sure the Replication Agent instance is shut down. If it is not, use the shutdown command to terminate the Replication Agent instance.

  2. Copy the default Replication Agent configuration file (such as rai.cfg) from the rax-12_5\config directory to the Replication Agent instance directory.

    For example, if the Replication Agent instance is named “NY2_RA,” you would use the following command at the operating system prompt in the Replication Agent base directory to copy the default Replication Agent for Oracle configuration file:

    copy config\rao.cfg NY2_RA\NY2_RA.cfg
    
  3. Using your the access tool for your primary database (such as Informix dbaccess), log in to the primary database and find the Replication Agent transaction log system table ra_xlog_system_, where ra_ is the prefix string you specified in the pdb_xlog_prefix parameter. Once you find the transaction log system table, make a note of the prefix string so you can reset the value of the pdb_xlog_prefix parameter.

  4. Start the Replication Agent instance using the following command at the operating system prompt:

    ra -i inst_name
    

    where inst_name is the name of the Replication Agent instance you want to start.

  5. Log in to the 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 Replication Agent instance you want to administer.

  6. Use the ra_config command to set the log directory for the Replication Agent instance:

    ra_config log_directory, logpath
    

    where logpath is the full path specification for the Replication Agent instance.

    The following example is the path specified automatically when the Replication Agent instance is created:

    C:\rax-12_5\inst_name\log\
    

    where inst_name is the name of the Replication Agent instance.

  7. Use the ra_set_login command to reset the administrative user ID and password for the Replication Agent instance:

    ra_set_login username, password
    

    where username is the user ID of the Replication Agent instance administrative user and password is the corresponding password.

  8. Use the ra_config command to set the values of the following Replication Agent configuration parameters for the primary database:

    pdb_xlog_prefix pds_charset pds_database_name pds_datasource_name pds_host_name pds_password pds_port_number pds_server_name pds_service_name pds_username

  9. Use the ra_config command to set the values of the following Replication Agent configuration parameters for the primary Replication Server:

    rs_host_name rs_password rs_port_number rs_source_db rs_source_ds rs_username

  10. Use the ra_config command to set the values of the following Replication Agent configuration parameters for the RSSD of the primary Replication Server:

    rssd_charset rssd_database_name rssd_host_name rssd_password rssd_port_number rssd_username

  11. Use the shutdown command to shut down the Replication Agent instance so you can re-start the Replication Agent instance with the correct administrative user ID:

    shutdown
    
  12. Start the Replication Agent instance using the following command at the operating system prompt:

    ra -i inst_name
    

    where inst_name is the name of the Replication Agent instance you want to start.

  13. Log in to the 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 Replication Agent instance.

  14. Use the ra_status command to verify that the Replication Agent instance is in the Admin state:

    ra_status
    
  15. Use the test_connection command to verify that the Replication Agent instance can communicate with the primary database server, the primary Replication Server, and the RSSD of the primary Replication Server:

    test_connection
    
  16. Use the resume command to put the Replication Agent instance into the Replicating state.

    resume
    
  17. Use the ra_status command to verify that the Replication Agent instance is in the Replicating state:

    ra_status
    

If the Replication Agent instance successfully enters the Replicating state, then the information stored in the configuration file is correct for that Replication Agent instance.

If the Replication Agent instance remained in the Admin state after you invoked the resume command, then you still need to verify and correct the following items: