views:

222

answers:

2

If I have an SPFarm object in the WSS 3.0 API, how can I get the Server\Instance details of the config database?

+1  A: 

I'm not sure exactly what you want, but the service instance representing "Windows SharePoint Services Database" can be reached via (powershell example):

$farm = [Microsoft.SharePoint.Administration.SPFarm]::local
$farm.services | select name,typename | format-table -auto
Name                        TypeName
----                        --------
                            Forms Service
                            Windows SharePoint Services Web Application
WSS_Administration          Central Administration
                            SSP Job Control Service
SPAdmin                     Windows SharePoint Services Administration
                            Windows SharePoint Services Database
                            Office SharePoint Usage Analytics Service
                            Portal Service
ApplicationRegistryService  Business Data Catalog
                            Shared Services Timer
                            Office SharePoint Server Diagnostics Service
OSearch                     Office SharePoint Server Search
SPTimerV3                   Windows SharePoint Services Timer
                            Excel Calculation Services
SSOSRV                      Single Sign-on Service
SearchAdminSharedWebService Office SharePoint Server Search Admin Web Service
SPSearch                    Windows SharePoint Services Help Search
DCLauncher                  Document Conversions Launcher Service
DCLoadBalancer              Document Conversions Load Balancer Service
                            User Profile Service
PolicyConfigService         Microsoft.Office.RecordsManagement.Internal.PolicyConfigService
                            Windows SharePoint Services Outgoing E-Mail
                            Session State Service
                            Windows SharePoint Services Incoming E-Mail
                            Windows SharePoint Diagnostics Service

So, you can find it in the SPFarm instance's property Services (a collection,) where TypeName == "Windows SharePoint Services Database"

x0n
A: 

You have some info here.

But, for admin purposes, you should not access config DB directly but through SPFarm exposed members.

Ariel