Enables or disables replication for a stored procedure or displays the current replication status of a stored procedure.
sp_setrepproc
sp_setrepproc upd_pubs
sp_setrepproc upd_pubs, 'function'
sp_setrepproc upd_pubs, 'table'
sp_setrepproc upd_pubs, 'function', 'log_current'
sp_setrepproc upd_pubs, 'function', 'log_sproc'
Use sp_setrepproc with no parameters to display all replicated stored procedures in the database.
Use sp_setrepproc proc_name with no other parameters to display the current replication status of the stored procedure.
If you are using Adaptive Server version 11.5 or later, supported DDL commands and stored procedures executed inside a user stored procedure are copied to the standby database if the procedure is enabled for replication with sp_setrepproc.
Supported DDL commands and stored procedures executed inside a user stored procedure are not copied to the standby database if the procedure is not enabled for replication with sp_setrepproc.
If a replicated stored procedure contains DDL commands (for example, create table), Adaptive Server Enterprise generates an error unless the database option “DDL-in-Tran” is enabled on the database.
If the replicated stored procedure contains transactions and rollback commands that roll back the transaction, the rollback command rolls back the execution of the entire procedure.
Because of the outer transaction, Adaptive Server holds all the locks until the execution of the procedure is complete.