2

I have done replication on my SQL Server 2005 database. Now i want to show the status from my GUI.(Can be C# or else)

Is there is any method or API by which i can monitor the status of replication. This is for client confirmation that replication is working.

Thanks

Way something like this. http://www.sqlmonster.com/Uwe/Forum.aspx/sql-server-replication/11698/How-to-get-the-replication-status-using-RMO-in

prashant
  • 361
  • 9
  • 26

3 Answers3

3

A great option is this: How to Programmatically Monitor Replication (via T-SQL): http://msdn.microsoft.com/en-us/library/ms147874(SQL.90).aspx

And here's the SQL Server 2008 R2 version for anyone looking at this as well: http://msdn.microsoft.com/en-us/library/ms147874(SQL.100).aspx

Using these special procedures can be a tiny bit of a pain from within T-SQL (as you'll commonly want to export their output into temp tables or table variables to 'filter it' an additional bit or what-not), but most devs will find this kind of interaction MUCH easier to deal with than using RMOs.

Michael K. Campbell
  • 1,510
  • 10
  • 13
2

I like to use tracer tokens posted at regular intervals and then monitoring their status as they flow from publisher to distributor to subscriber. This can be done programatically with sp_posttracertoken at the publisher and checking the tracer token tables in the distributor. Hope this helps.

Ben Thul
  • 31,080
  • 4
  • 45
  • 68
1

Monitoring Replication with Replication Monitor

Microsoft SQL Server Replication Monitor is a graphical tool that allows you to monitor the overall health of a replication topology. Replication Monitor provides detailed information on the status and performance of publications and subscriptions...

How to: Start Replication Monitor (Replication Monitor)

Mitch Wheat
  • 295,962
  • 43
  • 465
  • 541
  • Thanks,i know the way of graphical tool.But it is not done by client, because they are non technical and doing these thing are bit tough and bad habit for them. Is there any api by which i can connect via sql and get the status,and show them via GUI. – prashant Mar 06 '11 at 06:25