Enables or disables replication for an Adaptive Server table or stored procedure. It also displays the current replication status of a table or stored procedure.
sp_setreplicate
sp_setreplicate publishers
sp_setreplicate publishers, 'true'
Use sp_setrepproc to enable or disable replication of stored procedures when you are using function replication definitions. Use either sp_setrepproc or sp_setreplicate to enable or disable replication of stored procedures when you are using table replication definitions.
Use sp_setreplicate with no parameters to display a list of replicated tables or stored procedures in the database.
Use sp_setreplicate object_name without true or false to display the current replication status of the table or stored procedure.
If you use sp_reptostandby to mark a table for implicit replication to the standby database, text, unitext, or image columns set by sp_setreplicate or sp_setrepcol to do_not_replicate are treated as replicate_if_changed. Columns set as always_replicate or replicate_if_changed are treated as marked.
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 Enterprise holds all the locks until the execution of the procedure is complete.