SharePoint Orphaned Content Database

Today I resolved an interesting SharePoint 2010 issue. Examining the Windows Application Log on the Application Server I found the following error:

SQL Database ‘WSS_Content_ba49ed16-9131-4e70-ab2a-4378914fd6f0’ on SQL Server instance ‘SharePointSQLServerName’ not found. Additional error information from SQL Server is included below.

In Central Admin SharePoint listed in “Stopped” content database called “WSS_Content_ba49ed16-9131-4e70-ab2a-4378914fd6f0″. This database didn’t exist in SQL Server.

I believe the database appeared when the SharePoint server was restarted but wasn’t able to contact the SQL Server due to an issue with DNS. A reference to the database existed but the database itself was never created.

The Get-SPContentDatabase command lists all databases except the one above. Hummm, this is going to be tricky to removed…

Here’s the process I followed to remove the database orphaned database:

  • In SQL restore a small content database into a new database and gave it the name listed in the event log error.
  • In Central Admin start the orphaned content database.
  • In Central Admin I viewed the content database properties and selected the “remove” option to delete the database.
  • Manually removed the database from SQL server.

The SharePoint environment is now back to it’s usual happy self.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s