sp_dropsubscription (Transact-SQL)
Belirli makale, yayın ve abonelikleri küme için abonelikler yayımcı üzerinde bırakır.Bu saklı yordam, yayın veritabanı üzerinde yayımcı adresindeki yürütülür.
Sözdizimi
sp_dropsubscription [ [ @publication= ] 'publication' ]
[ , [ @article= ] 'article' ]
, [ @subscriber= ] 'subscriber'
[ , [ @destination_db= ] 'destination_db' ]
[ , [ @ignore_distributor = ] ignore_distributor ]
[ , [ @reserved= ] 'reserved' ]
Bağımsız değişkenler
[ @publication= ] 'publication'
Is the name of the associated publication.publication is sysname, with a default of NULL.If all, all subscriptions for all publications for the specified Subscriber are canceled.publication is a required parameter.[ @article= ] 'article'
Is the name of the article.article is sysname, with a default value of NULL.If all, subscriptions to all articles for each specified publication and Subscriber are dropped.Use tüm hemen izin yayınlar için güncelleştirme.[ @subscriber= ] 'subscriber'
Is the name of the Subscriber that will have its subscriptions dropped.subscriber is sysname, with no default.If all, all subscriptions for all Subscribers are dropped.[ @destination_db= ] 'destination_db'
Is the name of the destination database.destination_db is sysname, with a default of NULL.BOŞ ise, o abonenin gelen tüm abonelikleri bırakılır.[ @ignore_distributor = ] ignore_distributor
Yalnızca bilgi amaçlı olarak belirtilmiştir. Desteklenmez. Gelecekteki uyumluluk garanti edilmez.[ @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_dropsubscription anlık görüntü ve işlem çoğaltma kullanılır.
Abonelik eşitleme anında yayın makale bırak, yayındaki tüm makaleleri abonelikleri bırak ve bunları tüm geri anda eklemek geri sürece ekleyemezsiniz.
Ö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 batch is executed at the Publisher to remove
-- a pull or push subscription to a transactional publication.
DECLARE @publication AS sysname;
DECLARE @subscriber AS sysname;
SET @publication = N'AdvWorksProductTran';
SET @subscriber = $(SubServer);
USE [AdventureWorks2008R2;]
EXEC sp_dropsubscription
@publication = @publication,
@article = N'all',
@subscriber = @subscriber;
GO
İzinler
Yalnızca üyeleri sysadmin sabit sunucu rolü db_owner sabit veritabanı rolü veya abonelik can oluşturan kullanıcının yürütmek sp_dropsubscription.