Tuesday, March 10, 2015

Configuring the Replication using Backup


Replication using backup =========================

1. configure the publication normally and dont select the initialization with snapshot option.

Open the publication properties--> select true for the option "intialize the subscription using backup"

take the backup and restore on the subscriber server.

2.After the backup has been restored on the subscriber, on the publisher we need to add a subscription to this publication.

Note the last three parameters in the command below this is what tells SQL Server how to initialize the subscriber:

@sync_type - using a backup
@backupdevicetype - the backup was created on disk
@backupdevicename - the name of the backup file that was created
/*At the publisher, run the following command */
USE [publication_database]
GO
EXEC sp_addsubscription 
@publication = 'publication_name', 
@subscriber = 'Enter your subscriber server name here', 
@destination_db = 'subscriber_dbname',
@sync_type = 'initialize with backup',
@backupdevicetype ='disk',
@backupdevicename = 'C:\R_PUB.bak'

No comments:

Post a Comment

COMMON SQL SERVER BACKUP FAILURE ERRORS AND ISSUES

  One of the most common task for a DBA’s are to perform installation of new SQL Server versions and installing patches. Most often or not e...