Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jbates99
Constraint Violating Yak Guru
396 Posts |
Posted - 2003-07-19 : 23:29:08
|
| Hi SQL Server admins,I'm a developer, not an admin. I want to write a VB or ASP app that will display lots of various info about my servers.My question for this forum is.. how can I determine if replication (the merge agent) is running on my server? (Right now, I open Enterprise Manager and look for the red X in the Replication folder.)Is there a table or ? that my program can read to determine whether replication is active or has failed?... and maybe T-SQL is a better method than VB?Thanks for your suggestions. John |
|
|
Stoad
Freaky Yak Linguist
1983 Posts |
Posted - 2003-07-21 : 07:36:32
|
| Maybe just check out whether or not replmerg.exe is inthe list of currently running processes on the host machine??- Vit |
 |
|
|
Stoad
Freaky Yak Linguist
1983 Posts |
Posted - 2003-07-28 : 06:21:30
|
| Sorry for my previous silly reply. This new one seems much better:Dim s As New SQLDMO.SQLServer, d As SQLDMO.DistributorDim st As Long, ts As Strings.Connect "(Distributor)", "sa", ""Set d = s.Replication.DistributorMsgBox d.DistributorAvailableCall d.GetAgentsStatus(SQLDMOReplAgent_Merge, st, ts)MsgBox st ' get current status'SQLDMOTask_Pending = 0'SQLDMOTask_Starting = 1'SQLDMOTask_Succeeded = 2'SQLDMOTask_Running = 3'SQLDMOTask_Idle = 4'SQLDMOTask_Retry = 5'SQLDMOTask_Failed = 6s.DisconnectSet d = NothingSet s = Nothing- Vit |
 |
|
|
|
|
|