Aracılığıyla paylaş


sp_droppullsubscription (Transact-SQL)

Abonelik abone, geçerli veritabanında yer bırakır.istek temelli abonelik veritabanı abone adresindeki Bu saklı yordam yürütülür.

Konu bağlantısı simgesiTransact-sql sözdizimi kuralları

Sözdizimi

sp_droppullsubscription [ @publisher= ] 'publisher'
        , [ @publisher_db= ] 'publisher_db'
        , [ @publication= ] 'publication'
    [ , [ @reserved= ] reserved ]

Bağımsız değişkenler

  • [ @publisher= ] 'publisher'
    Is the remote server name.publisher is sysname, with no default.If all, the subscription is dropped at all the Publishers.

  • [ @publisher_db= ] 'publisher_db'
    Is the name of the Publisher database.publisher_db is sysname, with no default.all means all the Publisher databases.

  • [ @publication= ] 'publication'
    Is the publication name.publication is sysname, with no default.If all, the subscription is dropped to all the publications.

  • [ @reserved= ] reserved
    Yalnızca bilgi amaçlı olarak belirtilmiştir. Desteklenmez. Gelecekteki uyumluluk garanti edilmez.

Dönüş Kodu Değerleri

0 (başarılı) veya 1 (başarısız)

Açıklamalar

sp_droppullsubscription anlık görüntü çoğaltması çoğaltması çoğaltma ve işlem çoğaltma kullanılır.

sp_droppullsubscription karşılık gelen satır siler MSreplication_subscriptions (Transact-SQL) Tablo ve karşılık gelen dağıtıcı Aracısı adresindeki abone.Hiçbir satır içinde kalması durumunda MSreplication_subscriptions (Transact-SQL), onu düşünceye tablo.

Örnek

-- This script uses sqlcmd scripting variables. They are in the form
-- $(MyVariable). For information about how to use scripting variables  
-- on the command line and in SQL Server Management Studio, see the 
-- "Executing Replication Scripts" section in the topic
-- "Programming Replication Using System Stored Procedures".

-- This is the batch executed at the Subscriber to drop 
-- a pull subscription to a transactional publication.
DECLARE @publication AS sysname;
DECLARE @publisher AS sysname;
DECLARE @publicationDB     AS sysname;
SET @publication = N'AdvWorksProductTran';
SET @publisher = $(PubServer);
SET @publicationDB = N'AdventureWorks2008R2';

USE [AdventureWorks2008R2Replica]
EXEC sp_droppullsubscription 
  @publisher = @publisher, 
  @publisher_db = @publicationDB, 
  @publication = @publication;
GO

İzinler

Yalnızca üyeleri sysadmin sabit sunucu rolü veya istek temelli abonelik oluşturan kullanıcının yürütmek sp_droppullsubscription.The db_owner fixed database role is only able to execute sp_droppullsubscription if the user who created the pull subscription belongs to this role.