Aracılığıyla paylaş


TransPullSubscription Sınıfı

istek temelli abonelik için bir işlem temsil yayın.

Devralma Hiyerarşisi

System.Object
  Microsoft.SqlServer.Replication.ReplicationObject
    Microsoft.SqlServer.Replication.PullSubscription
      Microsoft.SqlServer.Replication.TransPullSubscription

Ad Alanı:  Microsoft.SqlServer.Replication
Derleme:  Microsoft.SqlServer.Rmo (Microsoft.SqlServer.Rmo içinde.dll)

Sözdizimi

'Bildirim
Public NotInheritable Class TransPullSubscription _
    Inherits PullSubscription
'Kullanım
Dim instance As TransPullSubscription
public sealed class TransPullSubscription : PullSubscription
public ref class TransPullSubscription sealed : public PullSubscription
[<SealedAttribute>]
type TransPullSubscription =  
    class
        inherit PullSubscription
    end
public final class TransPullSubscription extends PullSubscription

TransPullSubscription türü aşağıdaki üyeleri açıklar.

Oluşturucular

  Ad Açıklama
Ortak yöntem TransPullSubscription() Oluşturur Yeni bir örnek , TransPullSubscription WalkTree
Ortak yöntem TransPullSubscription(String, String, String, String, ServerConnection) Oluşturur Yeni bir örnek , TransPullSubscription sınıfının özelliklerini tanımlayan bir istek temelli abonelik.
Ortak yöntem TransPullSubscription(String, String, String, String, ServerConnection, Boolean) Yeni bir örneğini oluşturur TransPullSubscription sınıfı, bir istek temelli abonelik ve Aracısı oluşturmak verilip verilmeyeceğini tanımlayan özellikleri ile iş için abonelik

Üst

Özellikler

  Ad Açıklama
Ortak özellik AgentJobId Abonelik eşitlemek için kullanılan Aracısı iş kimliği alır. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik AgentOffload Alır veya Aracısı iş oluşturulduğu bilgisayarda farklı bir eşitleme Aracısı çalışır olup olmadığını ayarlar.This property is no longer supported for Distributors running Microsoft SQL Server 2005 and later. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik AgentOffloadServer Alır veya burada uzaktaki aracı etkinleştirme kullanırken Agent'in uzak bilgisayarın adını ayarlar. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik AgentSchedule Abonelik eşitlemek için kullanılan Aracısı iş için zamanlama alır. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik AltSnapshotFolder Alır veya yayın anlık görüntü dosyaları nerede dağıtımcı varsayılan anlık konumda kullanıldığında elde edilen konumu ayarlar. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik Attributes Alır veya ayarlar bir işlem özniteliklerini yayın abonelik tarafından desteklenir.
Ortak özellik CachePropertyChanges Alır veya çoğaltma özelliklerinde yaptığınız değişiklikler önbelleğe mi, yoksa hemen uygulamak için ayarlar. (ReplicationObject öğesinden devralınmıştır.)
Ortak özellik ConnectionContext Gets or sets the connection to an instance of Microsoft SQL Server. (ReplicationObject öğesinden devralınmıştır.)
Ortak özellik CreateSyncAgentByDefault Alır veya abonelik oluşturulduğunda, abonelik eşitlemek için çoğaltma aracısı başlatmak için kullanılan Aracısı iş oluşturulmuş olup olmadığını ayarlar. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik DatabaseName Alır veya ayarlar abonelik veritabanı. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik Description Alır veya ayarlar metinsel istek temelli abonelik açıklaması. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik DistributorName Gets or sets the instance of Microsoft SQL Server that is the Distributor and is distributing the publication to which the subscription subscribes. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik DistributorSecurity Dağıtımcı olarak bağlanmak için kullanılan güvenlik bağlamını alır. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik DtsPackageLocation Alır veya ayarlar Veri Dönüştürme Hizmetleri (dts) konumu paket transformable abonelik ile kullanılır.
Ortak özellik DtsPackageName Alır veya ayarlar Veri Dönüştürme Hizmetleri (dts) paket transformable abonelik içinde kullanılan adı.
Ortak özellik DtsPackagePassword Transformable abonelik ile kullanılan parolayı ayarlar.
Ortak özellik EnabledForSynchronizationManager Abonelik Eşitleme Yöneticisi'ni kullanarak eşitlenebilir olup olmadığını belirtir. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik FtpAddress Altyapı. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik FtpLogin Altyapı. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik FtpPassword Altyapı. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik FtpPort Altyapı. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik IsExistingObject Nesne veya sunucuda var olup olmadığını alır. (ReplicationObject öğesinden devralınmıştır.)
Ortak özellik LastAgentDateTime Tarih ve saat Abonelik son eşitlendiği zaman alır. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik LastAgentStatus En son eşitleme abonelik durumunu alır. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik LastAgentSummary En son eşitleme abonelik sonuç özetini alır. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik LastSummaryDateTime Tarih ve Son eşitlemenin tamamlandığı saat alır.
Ortak özellik Name istek temelli abonelik için oluşturulan adını alır. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik PublicationDBName Alır veya yayın veritabanı adını ayarlar. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik PublicationName Alır veya ayarlar için abonelik abone olan yayın adı. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik PublisherName Alır veya ayarlar Yayımcı. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik PublisherSecurity Alır veya ayarlar için yayımcı bağlanırken eşitleme Aracısı tarafından kullanılan güvenlik bağlamını. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik SecureFtpPassword Altyapı. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik SqlServerName Gets the name of the Microsoft SQL Server instance to which this object is connected. (ReplicationObject öğesinden devralınmıştır.)
Ortak özellik SubscriberSecurity Abone için bağlanırken eşitleme Aracısı tarafından kullanılan güvenlik bağlamını alır. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik SubscriberType Alır veya abonelik güncelleştirme davranışını ayarlar.
Ortak özellik SubscriptionId Abonelik kimliği değerini alır. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik SubscriptionType gönderme, çekme veya anonim abonelik için abonelik kayıt olup olmadığını alır. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik SynchronizationAgent Temsil eden bir nesne alır bir örnek abonelik eşitlemek için kullanılan Dağıtım Aracısı'nın.
Ortak özellik SynchronizationAgentProcessSecurity Belirtmek için kullanılan güvenlik bağlamını alır Microsoft Windows eşitleme Aracısı iş çalıştığı hesabı eşitlemek abonelik. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik Type Altyapı. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik UseFtp Alır veya Dosya Aktarım Protokolü (ftp) kullanarak eşitleme Aracısı tarafından erişilen istek temelli abonelik başlatmak için gereken anlık görüntü dosyaları olup olmadığını ayarlar. (PullSubscription öğesinden devralınmıştır.)
Ortak özellik UserData Alır veya ayarlar bir nesne özellik, kullanıcıların nesneye, kendi veri eklemesine olanak verir. (ReplicationObject öğesinden devralınmıştır.)
Ortak özellik WorkingDirectory Alır veya ayarlar yol dizini geçici olarak depolamak ve genişletmek için kullanılan abone adresindeki anlık görüntü dosyaları karşıdan. (PullSubscription öğesinden devralınmıştır.)

Üst

Yöntemler

  Ad Açıklama
Korumalı yöntem CheckValidCreation Altyapı. (ReplicationObject öğesinden devralınmıştır.)
Korumalı yöntem CheckValidDefinition Altyapı. (PullSubscription öğesinden devralınmıştır.)
Ortak yöntem CommitPropertyChanges Sends all the cached property change statements to the instance of Microsoft SQL Server. (ReplicationObject öğesinden devralınmıştır.)
Ortak yöntem Create istek temelli abonelik üzerinde abone oluşturur. (PullSubscription öğesinden devralınmıştır.)
Korumalı yöntem CustomEnabledForSyncMgr Altyapı. (PullSubscription öğesinden devralınmıştır.)
Ortak yöntem Decouple Sunucu çoğaltma başvurulan nesneden decouples. (ReplicationObject öğesinden devralınmıştır.)
Ortak yöntem Equals (Object öğesinden devralınmıştır.)
Korumalı yöntem Finalize (Object öğesinden devralınmıştır.)
Korumalı yöntem GetChangeCommand Altyapı. (ReplicationObject öğesinden devralınmıştır.)
Korumalı yöntem GetCreateCommand Altyapı. (ReplicationObject öğesinden devralınmıştır.)
Korumalı yöntem GetDropCommand Altyapı. (ReplicationObject öğesinden devralınmıştır.)
Ortak yöntem GetHashCode (Object öğesinden devralınmıştır.)
Ortak yöntem GetType (Object öğesinden devralınmıştır.)
Korumalı yöntem InitMemberVariables Altyapı. (PullSubscription öğesinden devralınmıştır.)
Korumalı yöntem InternalRefresh Altyapı. (ReplicationObject öğesinden devralınmıştır.)
Ortak yöntem LastAgentJobHistoryInfo Çalıştırıldığı son eşitleme Aracısı iş bilgilerini döndürür. (PullSubscription öğesinden devralınmıştır.)
Ortak yöntem Load Varolan bir nesnenin özelliklerini sunucudan yükler. (ReplicationObject öğesinden devralınmıştır.)
Ortak yöntem LoadProperties Varolan bir nesnenin özelliklerini sunucudan yükler. (ReplicationObject öğesinden devralınmıştır.)
Korumalı yöntem MemberwiseClone (Object öğesinden devralınmıştır.)
Ortak yöntem Refresh Nesnenin özelliklerini yeniden yükler. (ReplicationObject öğesinden devralınmıştır.)
Ortak yöntem Reinitialize istek temelli abonelik reinitialization için işaretler.
Ortak yöntem Remove istek temelli abonelik kaldırır. (PullSubscription öğesinden devralınmıştır.)
Ortak yöntem Script Döndürür bir Transact-SQL oluşturmak veya istek temelli abonelik silmek için komut dosyası tabanlı, geçerli özellik ayarı PullSubscription nesne. (PullSubscription öğesinden devralınmıştır.)
Ortak yöntem StopSynchronizationJob Çalışan bir dağıtım aracısını durdurma girişiminde iş abonelik eşitliyor. (PullSubscription.StopSynchronizationJob() öğesini geçersiz kılar.)
Ortak yöntem SynchronizeWithJob Aracısı başlar iş abonelik eşitlemek için. (PullSubscription.SynchronizeWithJob() öğesini geçersiz kılar.)
Ortak yöntem ToString (Object öğesinden devralınmıştır.)

Üst

Açıklamalar

istek temelli abonelik için Abone tarafında Dağıtım Aracısı çalıştırır.

Bu ad, sınıf veya üye yalnızca desteklenen sürüm 2.0.net Framework.

İş Parçacığı Güvenliği

Herhangi bir ortak statik (Shared , Microsoft Visual Basic) bu tür üyeler birden çok iş parçacığı işlemleri. için güvenliHerhangi bir örnek üyenin iş parçacığı için güvenli olduğu garanti edilmemiştir.

Örnekler

           // Define the Publisher, publication, and databases.
            string publicationName = "AdvWorksProductTran";
            string publisherName = publisherInstance;
            string subscriberName = subscriberInstance;
            string subscriptionDbName = "AdventureWorks2008R2Replica";
            string publicationDbName = "AdventureWorks2008R2";

            //Create connections to the Publisher and Subscriber.
            ServerConnection subscriberConn = new ServerConnection(subscriberName);
            ServerConnection publisherConn = new ServerConnection(publisherName);

            // Create the objects that we need.
            TransPublication publication;
            TransPullSubscription subscription;

            try
            {
                // Connect to the Publisher and Subscriber.
                subscriberConn.Connect();
                publisherConn.Connect();

                // Ensure that the publication exists and that 
                // it supports pull subscriptions.
                publication = new TransPublication();
                publication.Name = publicationName;
                publication.DatabaseName = publicationDbName;
                publication.ConnectionContext = publisherConn;

                if (publication.IsExistingObject)
                {
                    if ((publication.Attributes & PublicationAttributes.AllowPull) == 0)
                    {
                        publication.Attributes |= PublicationAttributes.AllowPull;
                    }

                    // Define the pull subscription.
                    subscription = new TransPullSubscription();
                    subscription.ConnectionContext = subscriberConn;
                    subscription.PublisherName = publisherName;
                    subscription.PublicationName = publicationName;
                    subscription.PublicationDBName = publicationDbName;
                    subscription.DatabaseName = subscriptionDbName;

                    // Specify the Windows login credentials for the Distribution Agent job.
                    subscription.SynchronizationAgentProcessSecurity.Login = winLogin;
                    subscription.SynchronizationAgentProcessSecurity.Password = winPassword;

                    // Make sure that the agent job for the subscription is created.
                    subscription.CreateSyncAgentByDefault = true;

                    // By default, subscriptions to transactional publications are synchronized 
                    // continuously, but in this case we only want to synchronize on demand.
                    subscription.AgentSchedule.FrequencyType = ScheduleFrequencyType.OnDemand;

                    // Create the pull subscription at the Subscriber.
                    subscription.Create();

                    Boolean registered = false;

                    // Verify that the subscription is not already registered.
                    foreach (TransSubscription existing
                        in publication.EnumSubscriptions())
                    {
                        if (existing.SubscriberName == subscriberName
                            && existing.SubscriptionDBName == subscriptionDbName)
                        {
                            registered = true;
                        }
                    }
                    if (!registered)
                    {
                        // Register the subscription with the Publisher.
                        publication.MakePullSubscriptionWellKnown(
                            subscriberName, subscriptionDbName,
                            SubscriptionSyncType.Automatic,
                            TransSubscriberType.ReadOnly);
                    }
                }
                else
                {
                    // Do something here if the publication does not exist.
                    throw new ApplicationException(String.Format(
                        "The publication '{0}' does not exist on {1}.",
                        publicationName, publisherName));
                }
            }
            catch (Exception ex)
            {
                // Implement the appropriate error handling here.
                throw new ApplicationException(String.Format(
                    "The subscription to {0} could not be created.", publicationName), ex);
            }
            finally
            {
                subscriberConn.Disconnect();
                publisherConn.Disconnect();
            }
' Define the Publisher, publication, and databases.
Dim publicationName As String = "AdvWorksProductTran"
Dim publisherName As String = publisherInstance
Dim subscriberName As String = subscriberInstance
Dim subscriptionDbName As String = "AdventureWorks2008R2Replica"
Dim publicationDbName As String = "AdventureWorks2008R2"

'Create connections to the Publisher and Subscriber.
Dim subscriberConn As ServerConnection = New ServerConnection(subscriberName)
Dim publisherConn As ServerConnection = New ServerConnection(publisherName)

' Create the objects that we need.
Dim publication As TransPublication
Dim subscription As TransPullSubscription

Try
    ' Connect to the Publisher and Subscriber.
    subscriberConn.Connect()
    publisherConn.Connect()

    ' Ensure that the publication exists and that 
    ' it supports pull subscriptions.
    publication = New TransPublication()
    publication.Name = publicationName
    publication.DatabaseName = publicationDbName
    publication.ConnectionContext = publisherConn

    If publication.IsExistingObject Then
        If (publication.Attributes And PublicationAttributes.AllowPull) = 0 Then
            publication.Attributes = publication.Attributes _
            Or PublicationAttributes.AllowPull
        End If

        ' Define the pull subscription.
        subscription = New TransPullSubscription()
        subscription.ConnectionContext = subscriberConn
        subscription.PublisherName = publisherName
        subscription.PublicationName = publicationName
        subscription.PublicationDBName = publicationDbName
        subscription.DatabaseName = subscriptionDbName
        subscription.Description = "Pull subscription to " + publicationDbName _
        + " on " + subscriberName + "."

        ' Specify the Windows login credentials for the Distribution Agent job.
        subscription.SynchronizationAgentProcessSecurity.Login = winLogin
        subscription.SynchronizationAgentProcessSecurity.Password = winPassword

        ' Make sure that the agent job for the subscription is created.
        subscription.CreateSyncAgentByDefault = True

        ' By default, subscriptions to transactional publications are synchronized 
        ' continuously, but in this case we only want to synchronize on demand.
        subscription.AgentSchedule.FrequencyType = ScheduleFrequencyType.OnDemand

        ' Create the pull subscription at the Subscriber.
        subscription.Create()

        Dim registered As Boolean = False

        ' Verify that the subscription is not already registered.
        For Each existing As TransSubscription In publication.EnumSubscriptions()
            If existing.SubscriberName = subscriberName And _
                existing.SubscriptionDBName = subscriptionDbName Then
                registered = True
            End If
        Next existing
        If Not registered Then
            ' Register the subscription with the Publisher.
            publication.MakePullSubscriptionWellKnown( _
             subscriberName, subscriptionDbName, _
             SubscriptionSyncType.Automatic, _
             TransSubscriberType.ReadOnly)
        End If
    Else
        ' Do something here if the publication does not exist.
        Throw New ApplicationException(String.Format( _
         "The publication '{0}' does not exist on {1}.", _
         publicationName, publisherName))
    End If
Catch ex As Exception
    ' Implement the appropriate error handling here.
    Throw New ApplicationException(String.Format( _
        "The subscription to {0} could not be created.", publicationName), ex)
Finally
    subscriberConn.Disconnect()
    publisherConn.Disconnect()
End Try

İş Parçacığı Güvenliği

Bu türdeki tüm ortak static (Visual Basic'te Shared) üyeler iş parçacığı için güvenlidir. Herhangi bir örnek üyenin iş parçacığı için güvenli olduğu garanti edilmemiştir.