Export (0) Print
Expand All
Expand Minimize

EnumPublications Method

This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.

The EnumPublications method returns a QueryResults object that enumerates the publications of a replication publishing data source.


object
.EnumPublications(
Database 
,
ReplicationType 
,
AgentLogin 
,
bSecurityCheck
)
as 
QueryResults

object

Expression that evaluates to an object in the Applies To list.

Database

String that identifies a replication database by name. Use % to specify all databases.

ReplicationType

Long integer that specifies a replication method and restricts result set membership as specified in Settings.

AgentLogin

String that identifies a Microsoft SQL Server login or an empty string.

bSecurityCheck

TRUE or FALSE as described in Settings.

HRESULT EnumPublications(LPSQLDMOQUERYRESULTS *ppResults,
SQLDMO_REPLICATION_TYPE ReplicationType = SQLDMORepType_TransactionalMerge
SQLDMO_LPCSTR DatabaseName = NULL,
SQLDMO_LPCSTR AgentLogin = NULL, BOOL bSecurityCheck = FALSE);

Set ReplicationType using these values.

Constant Value Description

SQLDMORepType_Merge

2

Result set enumerates merge replication publications.

SQLDMORepType_/Transactional

1

Result set enumerates transactional and snapshot replication publications.

SQLDMORepType_/TransactionalMerge

3

Result set enumerates all publications regardless of replication method.

When bSecurityCheck is TRUE, the method enumerates only publications accessible to the login used for SQLServer object connection. The AgentLogin argument is evaluated.

When bSecurityCheck is FALSE (default), all publications are enumerated.

A QueryResults object that contains one result set defined by these columns.

Column Data type Description

agent_access

bit

When TRUE, the login specified in the AgentLogin argument is a member of the publication access list.

allow_anonymous

bit

When TRUE, anonymous subscriptions are allowed.

allow_pull

bit

When TRUE, Subscriber-originated (pull) subscriptions are allowed.

allow_sync_tran

bit

When TRUE, the transactional replication publication is updatable at the Subscriber.

description

nvarchar(256)

Descriptive text.

distribution_db

nvarchar(129)

Name of the distribution database.

enabled_for_internet

bit

When TRUE, publication allows snapshot download using FTP.

immediate_sync

bit

When TRUE, a synchronization exists for the publication.

immediate_sync_ready

bit

When TRUE, a synchronization snapshot exists for the publication.

independent_agent

bit

TRUE for merge replication publications.

publication

nvarchar(129)

Publication name.

publisher

nvarchar(129)

Name of the data source publishing the data.

publisher_db

nvarchar(129)

Database name.

repl_freq

tinyint

Frequency used to replicate data. Interpret value using SQLDMO_REPFREQ_TYPE.

replication_type

tinyint

Replication method. Interpret value using SQLDMO_REPLICATION_TYPE.

thirdparty_flag

bit

When TRUE, the publication source is not an instance of SQL Server 2000.

vendor_name

nvarchar(129)

Name of the vendor of the product publishing the data.

Community Additions

ADD
Show:
© 2014 Microsoft