sp_changepublication Replication Stored Procedure

Changes a publication's properties.

Syntax

sp_changepublication publication [, property, 'value']

where

publication
Is the name of the publication.
property
Specifies the publication property to change. Can be name, description, taskid, sync_method, status, repl_freq, or restricted.
value
Specifies the publication value. Can be used with:
name
Is the new publication name.
description
Is an optional entry describing the publication.
taskid
Is a unique scheduler task ID created using the sp_addtask stored procedure.
sync_method
Specifies the synchronization method. Can be native (produces native-mode bulk copy output of all tables) or character (produces a character-mode bulk copy output of all tables).
status
Specifies the publication status. Can be inactive (publication data will not be available for subscribers when the publication is first created) or active (publication data is available immediately for subscribers).
repl_freq
Specifies the frequency of replication. Can be continuous (provides output of all log-based transactions) or snapshot (produces only scheduled synchronization events).
restricted
Specifies access to the publication. Can be false (the publication allows open enrollment and is visible to all) or true (the publication can be viewed only by authorized subscription servers).

Example

This example changes the name of the publication authors_publication to au_pub.

sp_changepublication authors_publication, name, 'au_pub'

Permission

Execute permission defaults to the system administrator and the database owner.

Tables Used

syspublications, sysdatabases

See Also

sp_addarticle sp_droppublication
sp_addpublication sp_enumfullsubscribers
sp_articlecolumn sp_helparticle
sp_changearticle sp_helparticlecolumns
sp_droparticle sp_helppublication