locked
Database attach succeeded, no site collections found MOSS 2007 RRS feed

  • Question

  • Scenario:

    Production farm (MOSS 2007) with content database.  Need to test cleaning up (remove orphaned features and webparts) the database prior to migration to 2010.  Backed up database on production SQL and restored to test SQL.  Attempted database attach through Central Admin, failed with error database guid already exists in farm.  Switched to stsadmn and attached database with -assignnewdatabaseid flag.  Database attached successfully to new web application created for testing purposes.

    Now, in Central Administration, in Site Collections, no new site collections are listed within in the new web application.  In Content Databases, when the new database is selected, it reports that there are no site collections.

    The [dbname].[dbo].[Sites] has two entries.  The [dbname].[dbo].[Versions] indicates that it is at the same version as the other content databases in the test farm (12.0.0.6520).

    I'm at a loss.  There do not appear to be any problems reported in the ULS or Application logs.  I'm almost positive this is something rather mundane, but I've yet to remove myself far enough away from the problem to see it.  Any help would be appreciated.

    Thursday, October 20, 2011 1:29 PM

Answers

  • Hi Phillip,

    this will happen if another database with the same site IDs is already attached to the farm.

    That is a common error if you take a SQL backup of an existing web application and restore it and then try to bind this to a second web application.

    Each site collection ID has to be unique in the farm.

    Cheers,
    Stefan


    Stefan Goßner
    Senior Escalation Engineer - Microsoft CSS
    This post is provided "AS IS" with no warrenties and confers no rights.
    • Marked as answer by Phillip C Thursday, October 20, 2011 2:40 PM
    Thursday, October 20, 2011 2:22 PM

All replies

  • Are you receiving any errors relating to database permissions (either in SQL or Windows log file?).
    Regards | Aaron www.aaron-rendell.co.uk | SharePoint Consultant | Microsoft Gold Partner - Silversands, Poole, Dorset, England
    Thursday, October 20, 2011 1:51 PM
  • Hi Phillip,

    this will happen if another database with the same site IDs is already attached to the farm.

    That is a common error if you take a SQL backup of an existing web application and restore it and then try to bind this to a second web application.

    Each site collection ID has to be unique in the farm.

    Cheers,
    Stefan


    Stefan Goßner
    Senior Escalation Engineer - Microsoft CSS
    This post is provided "AS IS" with no warrenties and confers no rights.
    • Marked as answer by Phillip C Thursday, October 20, 2011 2:40 PM
    Thursday, October 20, 2011 2:22 PM
  • Stefan,

    Ah, yes.  There is another web application (that mimics the web application in production) with a content database and the "same" site collection.  (And I just confirmed that the IDs are the same in .[dbo].[Sites].)

    I suspected that might have been the issue after I noticed something unrelated in the ULS and started digging deeper into the existing web applications.

    Thank you!

    Phil

    Thursday, October 20, 2011 2:39 PM