Monday, February 23, 2015

Troubleshoot ID 32008: DPM cannot protect this SharePoint farm as it cannot detect the configuration of the dependent SQL databases.

Today I helped a customer that was trying to protect a SharePoint-farm with DPM 2012 R2 UR5. 
The SharePoint was configured as followed:
  • 2 Front-End web (WFE) servers running on Windows Server 2012 R2
  • The SharePoint-databases resided on a SQL 2014 AlwaysOn-cluster.

When we tried to add the SharePoint form to a protection group, we were prompted with the following error:

DPM cannot protect this SharePoint farm as it cannot detect the configuration of the dependent SQL databases. (ID: 32008)

1) Ensure that the SharePoint VSS writer is reporting content databases on the front-end web server.

2) Verify that the SQL Server VSS writer is enabled and running in a healthy state on all the back-end SQL servers machines.

3) Verify if some of the databases that are part of this SharePoint farm are already being protected by DPM. To protect the SharePoint Farm, remove these databases from protection and delete their existing recovery points.

Additional details of the error could not be found in any logs on the DPM-server, WFE-servers or the SQL-servers…

Troubleshooting steps:
  1. Verify that the SharePoint VSS writer is running and the status is stable on the WFE-server. From an elevated command prompt: vssadmin list writers 
  2. Make sure that DPM are not protecting any SharePoint Config- or Content-databases that belongs to the SharePoint-farm. (Don’t forget to remove any inactive protection as well!)
  3. Run the ConfigureSharePoint command on the front-end web server from an elevated command prompt (%program files%\Microsoft Data Protection Manager\DPM\Bin\):
    ConfigureSharePoint.exe –EnableSharePointProtection 
  4. (For SQL-cluster using SQL Alias)
    Make sure your SQL aliases is configured properly on your WFEs (both 32bits & 64bits):
    http://mmman.itgroove.net/2013/11/03/setting-up-a-sql-server-alias-with-sharepoint-server-2013/ 

Additional troubleshooting:
However, even after performing the steps above we were still encountered with the same error message and DPM could not enumerate all SharePoint-content databases that belonged to the farm.

What we had to do (even as we could see that the SharePoint VSS writer was up and running) were to run the Stsadm command-line tool on the WFE-server. 
The Stsadm.exe is found together with the other SharePoint products and technologies in the default installation folder: %CommonProgramFiles%\microsoft shared\web server extensions\12\bin.

To register the SharePoint VSS writer you will have to run the following command from an elevated command prompt: stsadm -o –registerwsswriter.


After the operation completed successfully, we could go back to my DPM-server and configure protection for the SharePoint-farm with any errors.

//Markus

Tuesday, February 10, 2015

List unproteced volumes on your DPM-server

Hi folks,

Last week I encountered a customer that had a challenge that backup operators would add a production server to a protection group in DPM but not protect all necessary volumes on the production server.

To solve their challenge I created a PowerShell-script that queries all protected servers and compare what volumes they have with the protected volumes in DPM. The result of the script is a list with the server name and drive letter on the volume that is not protected.

# Create folder for output-files
New-item C:\Temp\DPM\Scripts -type directory -force | Out-Null

# Clears all content in output-files, if exists
Clear-Content C:\Temp\DPM\Scripts\AllVolumes.txt
Clear-Content C:\Temp\DPM\Scripts\ProtectedVolumes.txt
Clear-Content C:\Temp\DPM\Scripts\NotProtectedVolumes.txt

# Get all servers that is present in any Protection Groupp
$Allps = Get-ProductionServer | where { $_.ServerProtectionState -eq "HasDataSourcesProtected" }

# Gets all Protection Groups
$pg=Get-ProtectionGroup -DPMServerName (&hostname)

# Gets all protected Volumes
foreach ($ps in $pg) { GET-DataSource -ProtectionGroup $ps | where { $_.ObjectType -eq "Volume" } | Select Computer,Name | ft -HideTableHeaders | out-file -Width 50 C:\Temp\DPM\Scripts\ProtectedVolumes.txt -Append }

# Gets all available Volumes
foreach ($Allps1 in $Allps) { Get-DPMDatasource -ProductionServer $Allps1 -Inquire | where { $_.ObjectType -eq "Volume" } | Select Computer,Name | ft -HideTableHeaders | out-file -Width 50 C:\Temp\DPM\Scripts\AllVolumes.txt -Append }

# Removes empty lines and sort data from output-files
(gc C:\Temp\DPM\Scripts\ProtectedVolumes.txt) | ? {$_.trim() -ne "" } | Sort-Object | Set-Content C:\Temp\DPM\Scripts\ProtectedVolumes.txt
(gc C:\Temp\DPM\Scripts\AllVolumes.txt) | ? {$_.trim() -ne "" } | Sort-Object | Set-Content C:\Temp\DPM\Scripts\AllVolumes.txt

# Compare protected volumes with all volumes and exports not proteced volumes

Compare-Object $(Get-Content C:\Temp\DPM\Scripts\ProtectedVolumes.txt) $(Get-Content C:\Temp\DPM\Scripts\AllVolumes.txt) -PassThru | out-file -Width 50 C:\Temp\DPM\Scripts\NotProtectedVolumes.txt -Append

Remember to run the code in an elevated DPM Shell and if you want to use the script for another data-source rather then volumes: Change the "Volume" to for example "System Protection" in line 14 & 17. Example: { $_.ObjectType -eq "System Protection" }


Take care! //Markus