Aracılığıyla paylaş


sp_reinitmergepullsubscription (Transact-SQL)

İşaretleri birleştirme istek temelli abonelik reinitialization için sonraki saat Birleştirme Aracısı çalıştırır.Bu saklı yordam içinde abone adresindeki yürütülür abonelik veritabanı.

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

Sözdizimi

sp_reinitmergepullsubscription [ [ @publisher = ] 'publisher' ]
    [ , [ @publisher_db = ] 'publisher_db' ]
    [ , [ @publication = ] 'publication' ]
    [ , [ @upload_first = ] 'upload_first'

Bağımsız değişkenler

  • [ @ publisher =] 'publisher'
    Is the name of the Publisher.publisher is sysname, with a default of ALL.

  • [ @ publisher_db =] 'publisher_db'
    Is the name of the Publisher database.publisher_db is sysname, with a default of ALL.

  • [ @ yayın=] 'publication'
    Is the name of the publication.publication is sysname, with a default of ALL.

  • [ @ upload_first =] 'upload_first'
    Is whether changes at the Subscriber are uploaded before the subscription is reinitialized.upload_first is nvarchar(5), with a default of FALSE.If true, changes are uploaded before the subscription is reinitialized.If false, changes are not uploaded.

Dönüş Kodu Değerleri

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

Açıklamalar

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

Ekleme, bırakma veya parametreli filtre değiştirme, bekleyen değişiklikleri abone adresindeki yayımcı için yeniden başlatılması sırasında karşıya yüklenemiyor.Bekleyen değişiklikleri karşıya yüklemek istiyorsanız, filtre değiştirmeden önce tüm abonelikleri eşitleyin.

Ö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".

DECLARE @publicationDB AS sysname;
DECLARE @publication AS sysname;
SET @publicationDB = N'AdventureWorks2008R2';
SET @publication = N'AdvWorksSalesOrdersMerge';

USE [AdventureWorks2008R2Replica]

-- Execute at the Subscriber to reinitialize the pull subscription. 
-- Pending changes at the Subscrber are lost.
EXEC sp_reinitmergepullsubscription 
    @publisher = $(PubServer),
    @publisher_db = @publicationDB,
    @publication = @publication,
    @upload_first = N'false';
GO

-- Start the Merge Agent.

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

DECLARE @publicationDB AS sysname;
DECLARE @publication AS sysname;
SET @publicationDB = N'AdventureWorks2008R2';
SET @publication = N'AdvWorksSalesOrdersMerge';

USE [AdventureWorks2008R2Replica]

-- Execute at the Subscriber to reinitialize the pull subscription, 
-- and upload pending changes at the Subscriber. 
EXEC sp_reinitmergepullsubscription 
    @publisher = $(PubServer),
    @publisher_db = @publicationDB,
    @publication = @publication,
    @upload_first = N'true';
GO

-- Start the Merge Agent.

İzinler

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