Restored a Host Named Site DB attatched, but getting 404 and no sites found in list site collection? RRS feed

  • Question

  • We had this SharePoint Web Site Application with one site collection and several subsites under it, for this post lets call it

    There was a seperate database associated with the site.

    The users wanted to change the site domain to from

    So I created a new web application and tied it to, I then backed up the db for sitea, detatched it from the sitea , renamed the db and attatched it to siteb.  Siteb now has two databases, the one created when I created the web ap and the db I attached the sitea (renamed) db.  I logged into siteb and everything looks great except for the site title and security groups having to be renamed which I fixed.  So I thought we were golden.

    Now, users and owners of the site call back saying they can't see the subsites in the quicklaunch or even in view all. As site admin I can see and access them fine.  I see nothing in the way of security audiences settings that could be causing this.

    So next, I restore the sitea database from a backup and rename the db and the db files with a _B4 suffix and attach that db back to sitea. I do an iisreset on Web Front ends and I attempt to access sitea and I get a 404. I attempt to list site collections on sitea and none show up, so I confirm the restored db is on sitea. From SQL, I check the webs table in the restored Sitea and Siteb and see the subsites.

    One thing I noticed, the restored db of SiteA says 0 sites in content dbs. the first db created for siteb says 1 site and the db from sitea that attached to siteb also says 0 sites. I never created a site in siteb, I only attached the db from sitea.

    Two issues:
    Why can't users see subsites after I moved the site and renamed security groups?
    Why doesn't my site collection show up when I attached the restored db to the old site?

    Now what? Anybody?

    Thanks for any help or information!
    Tuesday, December 8, 2009 5:23 PM


All replies

  • Apparently, I'm having this issue:

    I associated my content db to a new web ap , and now I'm trying to associate a copy of that db to the original web ap (after having removed), but getting 0 sites after it's associated.

    I don't think removing the site entry from the config db would be a good idea, since the new site is probably using it.
    Tuesday, December 8, 2009 11:22 PM
  • Hi,

    Usually, SharePoint displays 0 sites when there is the same site collection ID twice in the same farm. I see in your first post that the steps you took are almost fine. I'm only not sure if renaming the DB is a good idea. Try to keep the same name. Here are the steps that always worked for me :

    - Detach the DB from the old site.
    - Create a new web application with the DB just detached ( you can create the wa with a temporary DB and attach your real content DB later)
    - May be you will have to clear the Sharepoint cache ( )

    Hope this helps.


    Djamel Chagour

    My Blog -
    Wednesday, December 9, 2009 2:41 AM
  • Yes I think that is the issue.

    As a test, I restored the DB back to the original name and tried deleting sitea web ap and recreating from scratch with a new db and then re-adding the DB to it, but again, 0 sites.

    Wednesday, December 9, 2009 3:27 PM
  • You need to delete / remove the content db that is created when you create the new Web App, then add the content db of the Web App that want to use it has to be the first db in the list of content dbs.


    Ivan Sanders My LinkedIn Profile, My Blog, @iasanders.
    Wednesday, December 9, 2009 9:52 PM