开发者

WSS: Determining config database details from SPFarm object

If I have an SPFarm object in the WSS 3.0 API, how can I get the Server开发者_开发技巧\Instance details of the config database?


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"


You have some info here.

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜