Logging replicated stored procedures

Adaptive Server uses the following method to determine in which database a replicated stored procedure execution will be logged:

The procedure gets 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.