【发布时间】:2020-02-21 05:51:41
【问题描述】:
一个问题在我脑海中触发,我如何才能找到我的 Sharepoint 链接/站点所在的数据库服务器机器信息。我正在使用 Sharepoint 2013 服务器并寻找任何方法来获取我的数据库位置信息。
【问题讨论】:
标签: sharepoint sharepoint-2013
一个问题在我脑海中触发,我如何才能找到我的 Sharepoint 链接/站点所在的数据库服务器机器信息。我正在使用 Sharepoint 2013 服务器并寻找任何方法来获取我的数据库位置信息。
【问题讨论】:
标签: sharepoint sharepoint-2013
有很多方法可以找到您要查找的内容。首先想到的是:
Central Admin > 执行备份或 CentralAdmin /_admin/Backup.aspx
这将为您提供每个 Web 应用程序的详细列表,通过展开您将能够找到内容数据库的名称。
找到 SQL 数据库服务器,您可以转到 Central Admin > Application Management > Manage Content Databases
选择所需的 Web 应用程序,单击内容数据库名称将显示数据库服务器名称和数据库名称。
【讨论】:
以下脚本允许从存储在 Windows 注册表中的连接字符串确定 SharePoint DB 服务器:
if ((Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null)
{
Add-PsSnapin Microsoft.SharePoint.PowerShell
}
Function GetDbConnectionString()
{
$SPFarm = Get-SPFarm
$SPVersion = $SPFarm.BuildVersion.Major.ToString() + "." + $SPFarm.BuildVersion.Minor.ToString()
$ConfigDBKey = 'HKLM:\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\' + $SPVersion + '\Secure\ConfigDB'
(Get-ItemProperty -Path $ConfigDBKey -Name dsn).dsn
}
GetDbConnectionString
【讨论】:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0\Secure\ConfigDb