Solved

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

Posted on 2006-06-13
7
672 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
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

Free Webinar: AWS Backup & DR

Join our upcoming webinar with experts from AWS, CloudBerry Lab, and the Town of Edgartown IT to discuss best practices for simplifying online backup management and cutting costs.

Question has a verified solution.

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

Suggested Solutions

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
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 combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

733 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