Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

start and stop synchronizing in sql server 2008

$
0
0

we are using sql server 2008, have one publication db and two subscriptions db. we need to stop synchronizing at subscriber db while we load the data at publisher and as it completes then need to start synchronizing at subscriber from publisher. we are able to do by SQL replication monitor manually but we have an requirement to start and stop synchronizing programmatically.

I used below code to start and stop synchronizing but it did not work for me.

use master exec sp_replicationdboption @dbname = 'sqldbpool',@optname = 'publish', @value = 'true' go

use master exec sp_replicationdboption @dbname = 'sqldbpool',@optname = 'publish', @value = 'false' go

Any help would be appreciated.

Thanks in advance


Viewing all articles
Browse latest Browse all 17268

Trending Articles