代码之家  ›  专栏  ›  技术社区  ›  Ries

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

  •  1
  • Ries  · 技术社区  · 15 年前

    如果在WSS 3.0api中有一个SPFarm对象,如何获取配置数据库的服务器/实例详细信息?

    2 回复  |  直到 15 年前
        1
  •  1
  •   x0n    15 年前

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

    $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实例的property Services(集合)中找到它,其中TypeName=“Windows SharePoint Services数据库”

        2
  •  0
  •   Ariel    14 年前

    你有一些信息 here .

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