Archive for March, 2012

It is fascinating the variety of problems one can run across in a platform as large and complex as SharePoint. Yesterday, I was working on connecting our log-shipped content databases to our hot standby DR farm and ran into a quite unexpected error with executing the PowerShell cmdlet Test-SPContentDatabase:

PS C:\ > Test-SPContentDatabase -Name SP_Content_TFS -WebApplication http://sharepoint -ServerInstance dev
Test-SPContentDatabase : The server instance of the database could not be found
At line:1 char:23
+ Test-SPContentDatabase <<<< -Name SP_Content -WebApplication http://sharepoint -ServerInstance dev
+ CategoryInfo : ObjectNotFound: (SP_Content:String) [Test-SP
ContentDatabase], SPException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletCheckCon
Test-SPContentDatabase : Object reference not set to an instance of an object.
At line:1 char:23
+ Test-SPContentDatabase <<<< -Name SP_Content_TFS -WebApplication http://sharepoint -ServerInstance dev
+ CategoryInfo : InvalidData: (Microsoft.Share...ContentDatabase:
SPCmdletCheckContentDatabase) [Test-SPContentDatabase], NullReferenceExcep
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletCheckCon

Naturally, my first thoughts turned to problems with the setup in SQL Server. We use SQL aliases, so I first setup the alias. That didn’t solve the problem. The SQL Server is a cluster, so I tried going directly to one of the instances. That didn’t solve the problem. The farm account didn’t have a login: got that fixed, but that wasn’t the problem, either. Stumped.

In trying a different command on the content databases, something led me to think about the versions. Sure enough, no one had updated the DR farm the last time we applied a CU to the production environment. Thus, the content database was a newer version than the farm was. For example, the content database was using Dec 2011 CU, but the DR farm was only using Oct 2011 CU. A quick upgrade of the DR farm and Test-SPContentDatabase runs just fine now. (Phew!)

Sure would be nice if the error message wouldn’t point specifically at the “server instance” for this problem and, instead, would mention a problem with the content database, itself. Those are the breaks. And, besides, how many people are going to try to test a content database that’s newer than their farm? 🙂


Read Full Post »