One question triggering in my mind that how can I find database server machine info where my Sharepoint link/site exist. I'm using Sharepoint 2013 server and looking any way to get my database location info.
There are many ways to find what you are looking for. The first one that springs to mind would be to go to:
Central Admin > Perform a backup OR CentralAdmin /_admin/Backup.aspx
This will give you a detailed list of each web application and by expanding you will be able to find the Content Database's name.
Finding the SQL Database Server you could go to the Central Admin > Application Management > Manage Content Databases
Select the desired web application and the clicking on the content DB name will show you the DB Server name and the DB Name.
The following script allows to determine SharePoint DB server from a connection string stored in Windows Registry:
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With