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
views:
250answers:
2
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
2009-02-12 15:26:10
main i need to check that programitically not on the screen
Ashutosh Singh
2009-02-12 15:28:58
+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:
- Parse the results of the stsadm command to get the SSP Names
- Walk through all the SPWebApplication objects in the system and use that to find what SSPs they belong to
- Use reflection to call into the sealed, private API of MOSS to find out the names of the SSPs in the Farm.
Mark Mascolino
2009-02-12 22:47:56