Solved

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

Posted on 2006-06-13
7
668 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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

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…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now