SharePoint / WSS 3.0 SQL Database not found error

While reading the newsgroups, I found a neat solution to share with my readers. If you have deleted content databases of a site collection but you are still getting an error similar to the following in error log

SQL Database ‘WSS_Content_345’ on SQL Server instance ‘DBS1’ not found.

It is because SharePoint config database still has a record of deleted database and trying to connect to it.

Solution:

Run theĀ deletecontentdb stsadm command similar to the following :

stsadm -o deletecontentdb -url http://wss.company.com/sites/name1
-databasename WSS_Content_2

stsadm -o deletecontentdb -url http://wss.company.com/sites/name1

It will delete the old database entry from SharePoint Config database.

Share