sp_helppublication

Transact-SQL Reference

Transact-SQL Reference

sp_helppublication

Returns information about a publication. This stored procedure is executed at the Publisher on the publication database.

Syntax

sp_helppublication [ [ @publication = ] 'publication' ]
    [ , [ @found =] found OUTPUT]

Arguments

[@publication = ] 'publication'

Is the name of the publication to be viewed. publication is sysname, with a default of %, which returns information about all publications.

[@found = ] 'found' OUTPUT

Is a flag to indicate returning rows. found is int and an OUTPUT parameter, with a default of 23456. 1 indicates the publication is found. 0 indicates the publication is not found.

Result Sets
Column name Data type Description
pubid int ID for the publication.
name sysname Name of the publication.
restricted int Not used, set to 0.
status tinyint When publication data will be available.
task   Used for backward compatibility.
replication frequency tinyint Type of replication frequency:

0 = Transaction based
1 = Scheduled table refresh

synchronization method tinyint Synchronization mode:

0 = Native bulk copy program (bcp utility)
1 = Character bulk copy
3 = Concurrent, which means that native bulk copy (bcp utility) is used but tables are not locked during the snapshot
4 = Concurrent_c, which means that character bulk copy is used but tables are not locked during the snapshot

description nvarchar(255) Optional description for the publication.
immediate_sync bit Whether the synchronization files are created or re-created each time the Snapshot Agent runs.
enabled_for_internet bit Whether the synchronization files for the publication are exposed to the Internet, through FTP and other services.
allow_push bit Whether push subscriptions are allowed on the publication.
allow_pull bit Whether pull subscriptions are allowed on the publication.
allow_anonymous bit Whether anonymous subscriptions are allowed on the publication.
independent_agent bit Whether there is a stand-alone Distribution Agent for this publication.
immediate_sync_ready bit Whether or not the Snapshot Agent generated a snapshot that is ready to be used by new subscriptions. This parameter is defined only if the publication is set to always have a snapshot available for new or reinitialized subscriptions.
allow_sync_tran bit Whether immediate-updating subscriptions are allowed on the publication.
autogen_sync_procs bit Whether to automatically generate stored procedures to support immediate-updating subscriptions.
snapshot_jobid binary(16) Scheduled task ID.
retention int Amount of change, in hours, to save for the given publication.

Remarks

sp_helppublication is used in snapshot and transactional replication.

Permissions

Execute permissions default to the public role.

See Also

sp_addarticle

sp_addpublication

sp_articlecolumn

sp_changepublication

sp_changearticle

sp_droparticle

sp_droppublication

sp_enumfullsubscribers

sp_helparticle

sp_helparticlecolumns

System Stored Procedures