如果我在 WSS 3.0 API 中有一个 SPFarm 对象,如何获取配置数据库的 Server\Instance 详细信息?
问问题
1072 次
2 回答
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"
于 2010-01-18T15:11:35.410 回答
0
你有一些信息在这里。
但是,出于管理目的,您不应直接访问配置数据库,而应通过 SPFarm 公开成员访问。
于 2010-01-19T13:04:47.200 回答