So you’ve set up yourself a nice farm of production, testing and acceptance SharePoint servers, and you want to build a new test server.
You make a backup through the Central Administration website, and on your soon to be testing server, you restore the backup.
And then you want to connect the restored Content database, only to discover that SharePoint claims that this database does not contain any sites… Oops?
Scramble to your database server, and look up the newly created content database. In there, there is a table called Sites. Write down the site ID of the sites you want to restore, and go to the Configuration database (SharePoint_Config*) of the server you want to restore your sites on. Open there the SiteMap table, and delete the records which contain the site ID’s you wrote down earlier. Reload the Content Databases page in Application Management, and presto! Your sites appear!