EnumPublications Method (SQL-DMO)

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

Applies To

Publisher Object

Syntax

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

Part Description
object Expression that evaluates to an object in the Applies To list.
Database String identifying a replication database by name. Use % to specify all databases.
ReplicationType Long integer specifying a replication method and restricting result set membership as specified in Settings.
AgentLogin String identifying a Microsoft® SQL Server™ login or an empty string.
bSecurityCheck True or False as described in Settings.

Settings

Set ReplicationType by 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.

Returns

A QueryResults object containing one result set defined by these columns.

Column Data type Description
publisher_db nvarchar(129) Database name.
publication nvarchar(129) Publication name.
replication_type tinyint Replication method. Interpret value by using SQLDMO_REPLICATION_TYPE.
immediate_sync bit When True, a synchronization exists for the publication.
allow_pull bit When True, Subscriber-originated (pull) subscriptions are allowed.
allow_anonymous bit When True, anonymous subscriptions are allowed.
enabled_for_internet bit When True, publication allows snapshot download using FTP.
repl_freq tinyint Frequency used to replicate data. Interpret value by using SQLDMO_
REPFREQ_TYPE.
immediate_sync_ready bit When True, a synchronization snapshot exists for the publication.
allow_sync_tran bit When True, the transactional replication publication is updatable at the Subscriber.
independent_agent bit True for merge replication publications.
agent_access bit When True, the login specified in the AgentLogin argument is a member of the publication access list.
thirdparty_flag bit When True, the publication source is not a SQL Server installation.
vendor_name nvarchar(129) Name of the vendor of the product publishing the data.
publisher nvarchar(129) Name of the data source publishing the data.
description nvarchar(256) Descriptive text.
distribution_db nvarchar(129) Name of the distribution database.

Prototype (C/C++)

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

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.