Subscription.SubscriptionType Property


获取该订阅注册是用于推送订阅还是请求订阅。Gets whether the subscription registration is for a push or pull subscription.

 property Microsoft::SqlServer::Replication::SubscriptionOption SubscriptionType { Microsoft::SqlServer::Replication::SubscriptionOption get(); };
public Microsoft.SqlServer.Replication.SubscriptionOption SubscriptionType { get; }
member this.SubscriptionType : Microsoft.SqlServer.Replication.SubscriptionOption
Public ReadOnly Property SubscriptionType As SubscriptionOption

Property Value


一个 SubscriptionOption 值。A SubscriptionOption value. 如果为 Push,则该订阅为推送订阅。If Push, the subscription is a push subscription.


SubscriptionType属性为只读属性。The SubscriptionType property is a read-only property.

在中 Microsoft SQL Server 2005 ,在发布服务器上跟踪所有订阅。In Microsoft SQL Server 2005, all subscriptions are tracked at the Publisher. 从不返回 AnonymousAnonymous is never returned.

使用 TransPullSubscriptionMergePullSubscription 创建请求订阅。Use TransPullSubscription or MergePullSubscription to create a pull subscription. 有关详细信息,请参阅如何:创建请求订阅(RMO 编程)For more information, see How to: Create a Pull Subscription (RMO Programming).

SubscriptionType只有发布服务器上的sysadmin固定服务器角色的成员、发布数据库上db_owner固定数据库角色的成员或创建订阅的用户才能检索属性。The SubscriptionType property can only be retrieved by members of the sysadmin fixed server role at the Publisher, by members of the db_owner fixed database role on the publication database, or by the user that created the subscription.

检索 SubscriptionType 属性等效于执行sp_helpsubscriptionsp_helpmergesubscriptionRetrieving the SubscriptionType property is equivalent to executing sp_helpsubscription or sp_helpmergesubscription.

Applies to