Replication Agent triggers do not fire

The Sybase Replication Agent uses a trigger-based approach to logging transactions for Informix and Microsoft SQL Server. If you determine the triggers are not firing (in other words, no entries are being made to the ra_tran_log_ table), the following procedure can help you determine where the problem is.

StepsTo troubleshoot Replication Agent trigger failure

  1. Verify marked and enabled status of primary objects.

    Use the Replication Agent pdb_setreptable, table_name command (or pdb_setrepproc, proc_name for a stored procedure) to display the marked and enabled status for the object in the primary database.

    The status for an individual table or procedure must be true for both marked and enabled attributes.

    For more information on these commands and how to change the marked and enabled status, refer to the Sybase Replication Agent Administration Guide.

  2. Verify access to primary database objects.

    Typically, if a permission violation occurs, you should see an access error message when attempting to update the primary table or execute the primary procedure.

    Use a standard client access tool (such as, isql, sqlplus, or dbaccess) to issue a simple insert or execute to the primary object, and check for any error messages. Make sure your client access tool is configured to display all messages.

  3. Verify that triggers or procedures are not disabled.

    Most data servers provide some means to disable a trigger or stored procedure.

  4. Check the Replication Agent exceptions table.

    The Sybase Replication Agent can be configured to record errors to an exception table and to bypass logging until the error is corrected.

    In the primary database, query the ra_exception_ table for entries. If you find any, resolve the errors and clear the exception table.

  5. Check the primary database system log for any error messages.

    Check any vendor specific system error tables For example, the Oracle ALL_ERRORS table may contain errors on triggers and stored procedures.

  6. Manually execute the trigger or procedure calls.

    To find the code executed by the trigger or stored procedure by examining the marking script that was created when the primary object was marked for replication.

    The object-marking scripts are located in the mark.sql file in the $SYBASE/RAX-12_6/instance_name/scripts/object_name/installed/ subdirectory.

    For more detailed information about the marking scripts and their location, refer to the Sybase Replication Agent Administration Guide.