The system procedure sp_setrepproc is used to mark stored procedures for replication. The syntax is:
sp_setrepproc [proc_name [, {'false' | 'table' | {'function' [, {‘log_current’ | ‘log_sproc’} ] } } ] ]
where:
proc_name – the name of a stored procedure in the current database.
'function' – enables replication for a stored procedure associated with a function replication definition.
'table' – enables replication for a stored procedure associated with a table replication definition. For information on replicating stored procedures associated with table replication definitions, see Appendix A, “Asynchronous Procedures,” in the Replication Server Administration Guide Volume 2.
'false' – disables replication for the stored procedure.
‘log_current’ – logs the execution of the stored procedure you are replicating in the current database, not in the database where the stored procedure resides.
‘log_sproc’ – logs the execution of the stored procedure you are replicating in the database where the stored procedure resides, not in the current database. ‘log_sproc’ is the default parameter.
Use sp_setrepproc according to these guidelines:
To list all replicated objects in the database, enter sp_setrepproc with no parameters.
To determine the replication status of the stored procedure, enter sp_setrepproc with the stored procedure name only.
Enter sp_setrepproc with the stored procedure name and 'function', 'table', or 'false' to enable each type of replication or to disable replication for the stored procedure. You must be the System Administrator or the Database Owner to use sp_setrepproc to change the replication status of a stored procedure.
To log the execution of a replicated stored procedure in the database you choose, enter sp_setrepproc with ‘log_current’, to log execution in the current database, or ‘log_sproc’, to log execution in the database where the stored procedure resides.
For either applied or request function replication, specify 'function' to indicate the type of replication definition associated with the stored procedure.
For more information on sp_setrepproc, see the Replication Server Reference Manual.