Replicated Stored Procedures Logging by Adaptive Server

Learn how Adaptive Server determines the database in which a replicated stored procedure execution is logged.

Stored procedure are logged in the database in which the enclosing transaction was started.

If the execution of a table-style replicated stored procedure (marked for replication by using either sp_setreplicateproc_name, 'true' or sp_setrepprocproc_name, 'table') is logged in one database and changes replicated tables in another database, the table’s changes and the procedure execution are logged in different databases. Therefore, the effects of the stored procedure execution can be replicated twice: the first time, the stored procedure execution itself is replicated; the second time, table changes that have been logged in the other database are replicated.

Restriction to Logging of Replicated Stored Procedures

Replicated Adaptive Server stored procedures cannot contain parameters with the text, unitext, or image datatypes.

See the Adaptive Server Reference Manual

Mixed-Mode Transactions

If a single transaction that invokes one or more request stored procedures is a mixed-mode transaction that also executes applied stored procedures or contains data modification language, Replication Server processes the request stored procedures after all the other operations.

All request operations are processed together in a single separate transaction. This may occur when a single Replication Server manages both primary and replicate data.