Solved

Retrieve a list of Replication Agents (merge/pull subscribers)

Posted on 2006-06-13
7
670 Views
Last Modified: 2008-02-26
Hi All,

Does anyone know how to programmatically (T-SQL) get a list of replication agents.  The list of agents is obviously shown under Replication Monitor / Publishers / Publisher and the Publication in Enterprise Manager.  However, I need to write a .NET App that monitors the status of replication and perform numerous custom maintenance options for an admin user.

Is there an internal SP that can retrieve this information?  The agents are Merge/Pull Subcribers.

For clarification of the list I'm looking for, see the GIF image link below:

http://www.limiteds.com/pms/subscriberagentlist.gif

Many thanks,

Treadmill
0
Comment
Question by:treadmill
  • 3
  • 2
7 Comments
 
LVL 28

Expert Comment

by:imran_fast
ID: 16900292
you have to look into the following tables which will be specific to the database.
syspublications
syssubscribtions
sysmergepublications

0
 
LVL 1

Author Comment

by:treadmill
ID: 16900643
Within my publication database, I do not have the tables syspublications or syssubscriptions.  sysmergepublications I do have, but there is only 1 row in that table.

The subscribers are anonymous pull subscribers to the publication database, which is a Filtered Merge Publication.

I also should have said that I'm referring to an SQL Server 2000 installation, just in case it differs from 2005.

Any ideas where I can get this information from?

0
 
LVL 1

Author Comment

by:treadmill
ID: 16900757
I finally found the answer myself by running a trace on the publication and found that sp_MSenum_merge_subscriptions, which is located in the "distribution" database will retrieve the exact results I require.

Here's an example on how to execute this:

exec [distribution].dbo.sp_MSenum_merge_subscriptions @publisher = N'ACCDATA1', @publisher_db = N'FIVESTARSYSTEMS', @publication = N'5StarFilt', @exclude_anonymous = 0

0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
LVL 1

Author Comment

by:treadmill
ID: 16900833
Also, you can find them in this database table:

select * from distribution..MSmerge_agents
0
 
LVL 28

Expert Comment

by:imran_fast
ID: 16949694
Hi,
Tread mill close the question.
and post the comment in the community support to refund your points.
0
 
LVL 1

Accepted Solution

by:
DarthMod earned 0 total points
ID: 17539397
PAQed with points refunded (500)

DarthMod
Community Support Moderator
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to shrink a transaction log file down to a reasonable size.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question