9202: nested stored procedures not allowed (LTM 1033)

6.5 Nested Replicated Stored Procedure

Symptoms

These error messages are displayed in the Adaptive Server error log.

96/03/04 14:01:53.34 RepAgent (10) Error: 9202, Severity: EX_CMDFATAL, State: 1
 Nested replicated stored procedure detected. Transaction log may be corrupt. Please contact SYBASE Technical Support.
W. 96/03/04 14:01:53. WARNING #1033 logscan thread(NYDS.nydb1) - /ltmscan.c(4689) Nested replicated stored procedure is not allowed. The procedure name = ‘south_nested’, pid = ‘456’, rid = ‘2’.

Explanation

A nested stored procedure is called from within another stored procedure. The stored procedure that calls the nested stored procedure is called the outer stored procedure.

If stored procedures with nested stored procedures are marked for replication with sp_setrepproc, then:

Solution

Do not use nested replicated stored procedures.

To solve this problem:

  1. Skip the nested stored procedure transaction:

    1. Find the page of the secondary truncation point, by executing:

      dbcc gettrunc
      
    2. Set a new secondary truncation point on the page after the nested stored procedure transaction by executing:

      dbcc settrunc (‘ltm’, ‘pageid’, pageid)
      

      where pageid is the id for the page after the current page you retrieved in Step a.

    3. Reset the locater by executing:

      rs_zeroltm
      
  2. Reapply only the nested stored procedure transaction.

  3. Restart RepAgent.