How to find what databases are in replication ???

Răspuns How to find what databases are in replication ???

  • Monday, April 02, 2012 8:52 PM
     
     
    hi can any one tell me ,How to find what databases are in replication ???

All Replies

  • Monday, April 02, 2012 9:01 PM
    Moderator
     
     Answered Has Code

    Try this:

    select * 
    from sys.databases
    where is_published = 1 or is_merge_published = 1 or is_subscribed = 1


    Brandon Williams (blog | linkedin)

  • Wednesday, April 04, 2012 10:21 AM
     
     Answered Has Code

    Yes, As correctly mentioned by Brandon.. just adding to the post how you can view it by GUI.

    Connect SQL Server INstance

    Then Expand the Local Publication If the Box is acting as Publisher (You Can Right on Publisher and check out with Publisher Properties for more detailed info), Else Subscriber if its acting as Subscriber....If its Distributor Then you can expand the database then System Database there you see Distributor DB.

    And add  

    select * from sys.databases where is_distributor= 1

    or 

    select * 
    from sys.databases
    where is_published = 1 or is_merge_published = 1 or is_subscribed = 1 or is_distributor= 1

    • Marked As Answer by coolguy123SQL Wednesday, April 04, 2012 8:55 PM
    •  
  • Wednesday, April 04, 2012 8:55 PM
     
     
    thanks
  • Wednesday, April 04, 2012 8:55 PM
     
     Answered
    Thanks
    • Marked As Answer by coolguy123SQL Wednesday, April 04, 2012 8:55 PM
    •  
  • Thursday, April 05, 2012 8:10 AM
     
     
    One of my database is subscribed via transactional replication and is_subscribed is showing 0 into sys.databases. Any idea why this?

    Kindly mark the reply as answer if they help