views:

250

answers:

2

what is the best way to find which are the default crawling accounts used for crawling for all the shared service providers in a Farm in MOSS i would prefer if any one can tell me using Shared Service Provider Database

A: 

Since you should only have a few SSPs in a Farm, the easiest way is to just check the SSP web admin screen for each one.

Checking via the database is problematic because SharePoint SSP databases could be stored all over the place on different machines.

Mark Mascolino
main i need to check that programitically not on the screen
Ashutosh Singh
+1  A: 

Well getting the value for one SSP is easy:

ServerContext serverCtx = ServerContext.Default;
SearchContext searchCtx = SearchContext.GetContext(serverCtx);
Content content = new Content(searchCtx);
Console.WriteLine(content.DefaultGatheringAccount);

The trick is getting it for all SSPs. As far as I can tell there isn't a public API to list all the SSPs for a Farm. There clearly is a private one since:

stsadm -o enumssp -all

returns a list of all SSPs. So your choices are:

  1. Parse the results of the stsadm command to get the SSP Names
  2. Walk through all the SPWebApplication objects in the system and use that to find what SSPs they belong to
  3. Use reflection to call into the sealed, private API of MOSS to find out the names of the SSPs in the Farm.
Mark Mascolino