0

Currently working on migrating SQL server from 2008 to 2012 project. We aware that sp_dboption is deprecated and it will not work in SQL server 2012. In 2008, had code to set the value for Published property.

EXEC master..sp_dboption DBName, published, TRUE

In 2012, below query is not working. I think i am using incorrect property name 'PUBLISHED'.

ALTER DATABASE DBName SET PUBLISHED ON

Please help me on the same.

Venkatesh R
  • 515
  • 1
  • 10
  • 27

1 Answers1

1

To modify database options that are associated with replication (merge publish, published, subscribed), use sp_replicationdboption.

sp_replicationdboption (Transact-SQL)

exec sp_replicationdboption @dbname = 'DBName',
@optname = 'publish',
@value = 'true'
sepupic
  • 8,409
  • 1
  • 9
  • 20