Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
sp_scriptpublicationcustomprocs (Transact-SQL)
Collapse the table of content
Expand the table of content

sp_scriptpublicationcustomprocs (Transact-SQL)

Applies To: SQL Server 2014, SQL Server 2016 Preview

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Scripts the custom INSERT, UPDATE, and DELETE procedures for all table articles in a publication in which the auto-generate custom procedure schema option is enabled. sp_scriptpublicationcustomprocs is particularly useful for setting up subscriptions for which the snapshot is applied manually.

Topic link icon Transact-SQL Syntax Conventions

sp_scriptpublicationcustomprocs [ @publication = ] 'publication_name'

[ @publication=] 'publication_name'

Is the name of the publication. publication_name is sysname with no default.

0 (success) or 1 (failure)

Returns a result set that consists of a single nvarchar(4000) column. The result set forms the complete CREATE PROCEDURE statement necessary to create the custom stored procedure.

Custom procedures are not scripted for articles without the auto-generate custom procedure (0x2) schema option.

The following procedures are used by sp_scriptpublicationcustomprocs to create procedures the Subscriber and should not be executed directly:

sp_script_reconciliation_delproc

sp_script_reconciliation_insproc

sp_script_reconciliation_vdelproc

sp_script_reconciliation_xdelproc

sp_scriptdelproc

sp_scriptinsproc

sp_scriptmappedupdproc

sp_scriptupdproc

sp_scriptvdelproc

sp_scriptvupdproc

sp_scriptxdelproc

sp_scriptxupdproc

Execute permission is granted to public; a procedural security check is performed inside this stored procedure to restrict access to members of the sysadmin fixed server role and db_owner fixed database role in current database.

Community Additions

ADD
Show:
© 2015 Microsoft