Aracılığıyla paylaş


sp_dropmergesubscription (Transact-SQL)

Bir birleştirme yayın ve ilişkili Birleştirme Aracısı için bir abonelik bırakır.Bu saklı yordam, yayın veritabanı üzerinde yayımcı adresindeki yürütülür.

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

Sözdizimi

sp_dropmergesubscription [ [ @publication= ] 'publication' ] 
    [ , [ @subscriber= ] 'subscriber'  
    [ , [ @subscriber_db= ] 'subscriber_db' ] 
    [ , [ @subscription_type= ] 'subscription_type' ] 
    [ , [ @ignore_distributor = ] ignore_distributor ] 
    [ , [ @reserved = ] reserved ]

Bağımsız değişkenler

  • [ @publication= ] 'publication'
    Is the publication name.publication is sysname, with a default of NULL.yayın önceden varolmalı ve tanıtıcı kurallarına uyar.

  • [ @subscriber=] 'subscriber'
    Is the name of the Subscriber.subscriber is sysname, with a default of NULL.

  • [ @subscriber_db= ] 'subscriber_db'
    Is the name of the subscription database.subscription_databaseis sysname, with a default of NULL.

  • [ @subscription_type= ] 'subscription_type'
    Is the type of subscription.subscription_typeis nvarchar(15), and can be one of these values.

    Değer

    Açıklama

    Tümü

    İtme ve çekme anonim abonelikleri

    Anonim

    Anonim abonelik.

    gönderme

    İtme abonelik.

    çekme

    Çekme abonelik.

    her ikisi de (varsayılan)

    gönderme ve çekme abonelikleri.

  • [ @ignore_distributor = ] ignore_distributor
    Indicates whether this stored procedure is executed without connecting to the Distributor.ignore_distributor is bit, with a default of 0.Bu parametre, bir abonelik dağıtımcı adresindeki temizleme görevleri yerine getirirken olmadan bırakmak için kullanılabilir.Dağıtıcı yeniden vardı onu da yararlı olur.

  • [ @reserved= ] reserved
    Is reserved for future use.reserved is bit, with a default of 0.

Dönüş Kodu Değerleri

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

Açıklamalar

sp_dropmergesubscription birleştirmede kullanılan çoğaltma.

Ö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 merge publication.
DECLARE @publication AS sysname;
DECLARE @subscriber AS sysname;
DECLARE @subscriptionDB AS sysname;
SET @publication = N'AdvWorksSalesOrdersMerge';
SET @subscriber = $(SubServer);
SET @subscriptionDB = N'AdventureWorks2008R2Replica';

USE [AdventureWorks2008R2]
EXEC sp_dropmergesubscription 
  @publication = @publication, 
  @subscriber = @subscriber, 
  @subscriber_db = @subscriptionDB;
GO

İzinler

Yalnızca üyeleri sysadmin sabit sunucu rolü veya db_owner sabit veritabanı rolü olabilir yürütmek sp_dropmergesubscription.