Ads

29 September 2026

Add subscriber - for existing publisher ( only specific table)

 Step 1: Manually add table to subscriber 

Note: if publisher is in DBO and subscriber is in another schema make sure import export has these changes 


Step2: Run together-


-- Re-add with 'replication support only'

EXEC sys.sp_addsubscription 

    @publication = N'Pubname', 

    @article = N'Article name', 

    @subscriber = N'subscriberserver', 

    @destination_db = N'Subscriber DB', 

    @subscription_type = N'Push', 

    @sync_type = N'replication support only', -- Bypasses snapshot initialization

    @update_mode = N'read only';

GO


-- Re-add the push agent

EXEC sys.sp_addpushsubscription_agent 

    @publication = N'Pubname', 

    @subscriber = N'Subscriber server', 

    @subscriber_db = N'Subscriber DB', 

    @job_login = N'domain\Acc', 

    @job_password = N'Password123*';

GO

No comments:

Post a Comment