Solved

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

Posted on 2006-06-13
7
673 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

 
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

Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

Question has a verified solution.

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

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

707 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