sp_dropmergesubscription (języka Transact-SQL)

Krople subskrypcja do publikacja korespondencji seryjnej i jego skojarzony Agent korespondencji seryjnej.Ta procedura składowana jest wykonywany na Wydawca na bazie publikacja.

Ikona łącza do tematuKonwencje składni Transact-SQL

Składnia

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

Argumenty

  • [ @ publikacja = 'publication"
    Is the publication name.publication is sysname, with a default of NULL.Publikacja musi już istnieją i są zgodne z zasadami dla identyfikatorów.

  • [ @ subskrybent = '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.

    Wartość

    Opis

    wszystkie

    Replikacja wypychana, ściągaći subskrypcje anonimowe

    anonimowe

    Anonimowe subskrypcja.

    wypychanie

    Subskrypcja wypychana.

    ściągać

    Ściągnij subskrypcja.

    obie (domyślnie)

    Zarówno wypychanie i ściągać subskrypcji.

  • [ @ 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.Tego parametru można upuścić subskrypcja bez wykonywania zadań oczyszczania u dystrybutora.Jest również przydatne, jeśli trzeba było ponownie dystrybutora.

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

Wartości kodów powrotnych

0 (sukces) lub 1 (błąd)

Uwagi

sp_dropmergesubscription używane w replikacja scalająca.

Przykład

-- 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

Uprawnienia

Tylko członkowie sysadmin stała rola serwera lub db_owner ustaloną rola bazy danych można wykonać sp_dropmergesubscription.