Aracılığıyla paylaş


sp_dropmergearticle (Transact-SQL)

Bir makaleyi bir mektup birleştirme kaldırır yayın.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_dropmergearticle [ @publication= ] 'publication'
        , [ @article= ] 'article' 
    [ , [ @ignore_distributor= ] ignore_distributor 
    [ , [ @reserved= ] reserved 
    [ , [ @force_invalidate_snapshot= ] force_invalidate_snapshot ]
    [ , [ @force_reinit_subscription = ] force_reinit_subscription ]
    [ , [ @ignore_merge_metadata = ] ignore_merge_metadata ]

Bağımsız değişkenler

  • [ @publication=] 'publication'
    Is the name of the publication from which to drop an article.publicationis sysname, with no default.

  • [ @article=] 'article'
    Is the name of the article to drop from the given publication.articleis sysname, with no default.If all, all existing articles in the specified merge publication are removed.Olsa bile, article olan tüm, yayın yine ayrı ayrı gelen kesilmesini gerekir makale.

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

  • [ @reserved=] reserved
    Is reserved for future use.reserved is nvarchar(20), with a default of NULL.

  • [ @force_invalidate_snapshot=] force_invalidate_snapshot
    Enables or disables the ability to have a snapshot invalidated.force_invalidate_snapshot is a bit, with a default 0.

    0 birleştirme makale değişiklikleri anlık görüntü geçersiz olarak neden belirtir.

    1 birleştirme makale değiştirir anlamına gelir anlık geçersiz olması neden olabilir ve o durum, değeri 1 yeni anlık görüntü ortaya izni verir.

  • [ @force_reinit_subscription = ] force_reinit_subscription
    Acknowledges that dropping the article requires existing subscriptions to be reinitialized.force_reinit_subscription is a bit, with a default of 0.

    0 o bırakma belirtir makale abonelik yeniden neden olmaz.

    1 o bırakma anlamına gelir makale yeniden, varolan abonelikleri neden olur ve gerçekleşmesi abonelik reinitialization izni verir.

  • [ @ignore_merge_metadata= ] ignore_merge_metadata
    Yalnızca iç kullanım.

Dönüş Kodu Değerleri

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

Açıklamalar

sp_dropmergearticle birleştirmede kullanılan çoğaltma.Makaleler bırakarak hakkında daha fazla bilgi için bkz: Varolan yayınlar için makaleleri ve bırakma makaleleri ekleme.

Yürütme sp_dropmergearticle bir makaleyi bir yayından bırakmak için nesneyi yayın veritabanı veya karşılık gelen nesnesinden kaldırılmaz abonelik veritabanı.Use DROP <object> , bu nesneler el ile kaldırmak için gerekli.

Örnek

DECLARE @publication AS sysname;
DECLARE @table1 AS sysname;
DECLARE @table2 AS sysname;
DECLARE @table3 AS sysname;
DECLARE @salesschema AS sysname;
DECLARE @hrschema AS sysname;
DECLARE @filterclause AS nvarchar(1000);
SET @publication = N'AdvWorksSalesOrdersMerge'; 
SET @table1 = N'Employee'; 
SET @table2 = N'SalesOrderHeader'; 
SET @table3 = N'SalesOrderDetail'; 
SET @salesschema = N'Sales';
SET @hrschema = N'HumanResources';
SET @filterclause = N'Employee.LoginID = HOST_NAME()';

-- Drop the merge join filter between SalesOrderHeader and SalesOrderDetail.
EXEC sp_dropmergefilter 
  @publication = @publication, 
  @article = @table3, 
  @filtername = N'SalesOrderDetail_SalesOrderHeader', 
  @force_invalidate_snapshot = 1, 
  @force_reinit_subscription = 1;

-- Drops the merge join filter between Employee and SalesOrderHeader.
EXEC sp_dropmergefilter 
  @publication = @publication, 
  @article = @table2, 
  @filtername = N'SalesOrderHeader_Employee', 
  @force_invalidate_snapshot = 1, 
  @force_reinit_subscription = 1;

-- Drops the article for the SalesOrderDetail table.
EXEC sp_dropmergearticle 
  @publication = @publication, 
  @article = @table3,
  @force_invalidate_snapshot = 1, 
  @force_reinit_subscription = 1;

-- Drops the article for the SalesOrderHeader table.
EXEC sp_dropmergearticle 
  @publication = @publication, 
  @article = @table2, 
  @force_invalidate_snapshot = 1, 
  @force_reinit_subscription = 1;

-- Drops the article for the Employee table.
EXEC sp_dropmergearticle 
  @publication = @publication, 
  @article = @table1,
  @force_invalidate_snapshot = 1, 
  @force_reinit_subscription = 1;
GO

DECLARE @publication AS sysname;
DECLARE @article1 AS sysname;
DECLARE @article2 AS sysname;
SET @publication = N'AdvWorksSalesOrdersMerge';
SET @article1 = N'SalesOrderDetail'; 
SET @article2 = N'SalesOrderHeader'; 

-- Remove articles from a merge publication.
USE [AdventureWorks2008R2]
EXEC sp_dropmergearticle 
  @publication = @publication, 
  @article = @article1,
  @force_invalidate_snapshot = 1;
EXEC sp_dropmergearticle 
  @publication = @publication, 
  @article = @article2,
  @force_invalidate_snapshot = 1;
GO

İzinler

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