Login or Sign Up to become a member!
LessThanDot Site Logo

LessThanDot

Community Wiki

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Navigation

Google Ads

RMO Enum all snapshot agents

From Wiki

Jump to: navigation, search

Use this base method to return a Data Table listing all snapshot agents

  1. public static DataTable EnumSnapshotAgents()
  2.         {
  3.             try
  4.             {
  5.                 string distributor = <distributor instance name>;
  6.  
  7.                 ServerConnection publisher = new ServerConnection(distributor);
  8.                 ReplicationMonitor snapMonitor = new ReplicationMonitor(publisher);
  9.                 snapMonitor.LoadProperties();
  10.  
  11.                 DataSet ds = snapMonitor.EnumSnapshotAgents();
  12.                 return ds.Tables[0];
  13.             }
  14.             catch (Exception ex)
  15.             {
  16.                 throw new ApplicationException(
  17.                     "The publication property could not be changed.", ex);
  18.             }
  19.         }

--onpnt 01:38, 30 December 2010 (GMT)

814 Rating: 2.3/5 (40 votes cast)