Using the ra_statistics command to troubleshoot  Checking the Replication Server

Chapter 4: Troubleshooting Sybase Replication Agent

Running out of memory

If you are running out of memory you will get the following error message:

java.lang.OutOfMemoryError

When you are running out of memory, the Replication Agent drops out of Replicating state, or the entire Replication Agent server may stop executing.

To support adjusting the amount of memory available to the JRE, all of the executable scripts (or batch files) in the Replication Agent /bin directory refer to an environment variable named RA_JAVA_MAX_MEM.

All Replication Agent instance RUN scripts also reference the RA_JAVA_MAX_MEM environment variable.

You can adjust the amount of memory available to the JRE by either:

If you start a Replication Agent instance by invoking the ra utility, you can set the value of the RA_JAVA_MAX_MEM system variable in your environment to specify the amount of memory available to the JRE. Before it sets the RA_JAVA_MAX_MEM variable to a default value, the ra and ra_admin utilities first check to see if it is already set.

If you start a Replication Agent instance by invoking the instance RUN script (or batch file), you can edit the instance RUN script to change the default value of RA_JAVA_MAX_MEM and specify the amount of memory available to the JRE.

NoteWhen a Replication Agent instance is started with the instance RUN script, the value of the RA_JAVA_MAX_MEM variable specified in the RUN script overrides the value set elsewhere. Therefore, you can edit the RUN script to adjust the memory available to the JRE for each instance individually.

Debugging LTL

LTL (Log Transfer Language) is the syntax used to communicate or distribute replication data to Replication Server. It is the principle output from a Replication Agent. For more details about LTL syntax, see the Replication Server Design Guide.

StepsTo debug LTL

  1. 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.

  2. Log in to the Replication Agent instance using the administrator login.

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

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

    ra_config LITTRACELTL, true
    
  5. Use the resume command to change the Replication Agent state to Replicating:

    resume
    
  6. When new replication activity is generated, check the LTITRACELTL.log file in the log directory to debug your problem.

Once new activity is generated, check the LTITRACELTL.log file in the log directory to debug your problem.

Uncompressing LTL for debugging a problem

By default, the LTL generated by the Replication Agent is compressed to reduce the amount of data sent to Replication Server, reducing network bandwidth. In cases where you require more verbose output to help debug a problem, change the following configuration parameters to produce more verbose LTL.

StepsTo produce more verbose LTL

  1. 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.

  2. Log in to the Replication Agent instance using the administrator login.

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

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

    ra_config column_compression = false

    ra_config compress_ltl_syntax = false

    ra_config structured_tokens = false

  5. When new replication activity is generated, check the LTITRACELTL.log file in the log directory to debug your problem.





Copyright © 2005. Sybase Inc. All rights reserved. Checking the Replication Server

View this book as PDF