Marking stored procedures for replication

The system procedure sp_setrepproc is used to mark stored procedures for replication. The syntax is:

sp_setrepproc [proc_name [, {'function' | 'table' | 'false'}, [{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:

For applied function delivery, mark the stored procedure in the primary database as replicated. For request function delivery, mark the stored procedure in the replicate database as replicated. In either case, specify 'function' to indicate the type of replication definition associated with the stored procedure.

For more information on sp_setrepproc, see Replication Server Reference Manual.