EnumAllSubscriptions Method

この機能は、将来のバージョンの Microsoft SQL Server では削除される予定です。新しい開発作業では、この機能の使用を避け、現在この機能を使用しているアプリケーションは修正するようにしてください。

The EnumAllSubscriptions method enumerates subscriptions in a database on a Subscriber.

構文

object.EnumAllSubscriptions(SubscriptionType, 
szSubscriptionDB)asQueryResults

Parts

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

  • SubscriptionType
    Integer that specifies what type of subscriptions to enumerate. Default is SQLDMOSubscription_Push.

  • szSubscriptionDB
    String that specifies the name of the subscription database. Default is NULL, in which case subscriptions in all databases are returned.

Prototype (C/C++)

HRESULT EnumAllSubscriptions(
LPSQLDMOQUERYRESULTS *ppResults, 
SQLDMO_SUBSCRIPTION_TYPE SubscriptionType,
SQLDMO_LPCSTR pszSubscriptionDB);

Settings

Set SubscriptionType using these values.

Constant

Value

Description

SQLDMOSubscription_All

3

Enumerate push and pull subscriptions.

SQLDMOSubscription_Pull

1

Enumerate pull subscriptions.

SQLDMOSubscription_Push

0

Default. Enumerate push subscriptions.

Returns

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

Column

Data type

Description

last_updated

Varchar(24)

Date publication was last updated.

publication

sysname

Name of the publication.

publisher

sysname

Name of the publisher.

publisherdb

sysname

Name of the publication database.

replication_type

nvarchar(15)

Replication method.

subscriber_db

sysname

Name of the subscription database.

subscription_type

nvarchar(5)

Subscription type.

update_mode

smallint

Method of updating. Interpret value using SQLDMO_TRANSUBSCRIBER_TYPE.

説明

In the result set, date and time data returned in last_updatedis formatted as YYYYMMDD hh:mm:ss.fff.

Date part

Description

YYYY

Represents the year in four digits

MM

Represents the month in two digits (zero padded)

DD

Represents the day of the month in two digits (zero padded)

hh

Represents the hour using two digits, a twenty-four hour clock (zero padded)

mm

Represents the minute in two digits (zero padded)

ss

Represents the second in two digits (zero padded)

fff

Represents the fractional part of the second in three digits

For example, the value 20040512 18:12:00.000 is interpreted as 6:12 P.M., May 12, 2004.

Push subscriptions are created at and controlled by the Publisher. The EnumAllSubscriptions method enumerates details of all push subscriptions that have been synchronized. Push subscriptions not synchronized are not included in the result set.

注意

If an application calls EnumAllSubscriptions on an instance of SQL Server version 7.0, the constant, SQLDMO_E_SQL80ONLY, and the message "This property or method requires Microsoft SQL Server 2000 or later" are returned.

Applies To: