WSS:从SPFarm对象确定配置数据库详细信息

时间:2010-01-18 14:47:16

标签: database sharepoint wss-3.0

如果我在WSS 3.0 API中有一个SPFarm对象,我该如何获取配置数据库的Server \ Instance详细信息?

2 个答案:

答案 0 :(得分:1)

我不确定您想要什么,但可以通过(powershell示例)访问代表“Windows SharePoint Services数据库”的服务实例:

$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

因此,您可以在SPFarm实例的属性Services(集合)中找到它,其中TypeName ==“Windows SharePoint Services Database”

答案 1 :(得分:0)

您有一些信息here

但是,出于管理目的,您不应直接访问配置DB,而应通过SPFarm公开的成员访问。