any way to tell if sp_replicationdboption is already enabled?

  • Poked around some but I couldn't find a workable 'If exists' example to test if a DB is already enabled for replication.  Just trying to script out a procedure and while I can run it even if it is, would rather test on it.

    thanks,

    Chris

     

  • What about the following?

    if exists (select * from master..sysdatabases where name = <DB Name> and category > 0)

    ...

  • category was what I was looking for, thanks

    Chris

  • You can also use:

    sp_helpreplicationdboption 'dbname'

Viewing 4 posts - 1 through 4 (of 4 total)

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