Script to Enable/Disable Database for Replication
You can enable the database for replication using below script.
use master
exec sp_replicationdboption @dbname = 'sqldbpoo',
@optname = 'publish',
@value = 'true'
go
If you have restore the database on test environment and you are getting the error that “Database is part of Replication”, you can clear/disable it by executing below query.
use master
exec sp_replicationdboption @dbname = 'sqldbpoo',
@optname = 'publish',
@value = 'false'
go
You can enable the database for replication using below script.
use master
exec sp_replicationdboption @dbname = 'sqldbpoo',
@optname = 'publish',
@value = 'true'
go
If you have restore the database on test environment and you are getting the error that “Database is part of Replication”, you can clear/disable it by executing below query.
use master
exec sp_replicationdboption @dbname = 'sqldbpoo',
@optname = 'publish',
@value = 'false'
go
No comments:
Post a Comment