The upgrade process from SharePoint 2007 to 2010 is relatively straightforward and painless… unless you encounter a problem during the upgrade process.
In most cases, the Test-SpContentDatabase cmdlet will notify you early in the process of potential gotchas and traps. In addition, the Test-SpContentDatabase cmdlet even provides a verbose level of feedback and recommendations when issues are encountered. Pretty sweet SharePoint team!
But, what happens when you receive an error while executing the
Mount-SpContentDatabase command. Say, something like this:
Mount-SPContentDatabase : Action 188.8.131.52 of Microsoft.SharePoint.Upgrade.SPContentDatabaseSequence failed.
At Line:1 char:24
+ Mount-SPContentDatabase <<<< –Name “My DB Name” –WebApplication “My URL”
+ CategoryInfo : InvalidData: (Microsoft.Share…ContentDatabase: SPCmdletMountContentDatabase) [Mount-SPContentDatabase], SPUpgradeException
+ FullyQualifiedErrorID : Microsoft.SharePOint.PowerShell.SPCmdletMountContentDatabase
While appearing very verbose, this error is not helpful and rather intimidating.
Log files, that’s what!
The upgrade process within SharePoint 2010 produces very verbose (and helpful) log files during the upgrade. These logs are located at
C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions14Logs
Find the log file ending with “-error” and review the contents for more details on what occurred during the actual upgrade. In the case of the error above, the following information was logged
[powershell] [SPContentDatabaseSequence] [ERROR] [7/11/2010 6:26:57 PM]: Exception: Cannot find the object "dbo.AuditData" because it does not exist or you do not have permissions.
Now we have something we can dig into and research!
Root cause for our failure
In this case, the content database was originally upgraded from SharePoint 2003 to SharePoint 2007. Somewhere in the migration process (and the intervening years), the dbo.AuditData table never got created.
To correct, we simply scripted the dbo.AuditData table from a existing (and functioning) SharePoint 2010 content database and executed those scripts against the failed content database.
Hopefully, your upgrade and migration issues are as easy to fix!