Alternative for sp_dboption published false

  • With SQL 2012 MS removed the sp_dboption.

    For most actions I can find an ALTER DATABASE SET option.

    But for the SP_DBOPTION <dbname> 'published', 'false' I can not fins a alternative.

    In a stored procedure I use the publication is removed and after that I want to set the database as not published. (which I did in SQL 2008R2 with the sp_dboption)

    Is there a way to do this in SQL 2012+ other then update the is_published column in sys.databases?

  • try

    sp_replicationdboption

  • oke, it can be that simple!

    Thanks.

    For further reference, I know use

    exec sp_replicationdboption @dbname = <database name>, @optname = 'publish', @value = 'false';

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply