locked
Content Database showing 0 (zero) site collection after content database attach RRS feed

  • Question

  • Hi,

    We are trying to restore the prod content database to the dev environment.

    We are following the below steps for restoring the database,

    • Take already Archived backup of the content DB
    • Attach that DB to the Dev environment
    • Create a new Web Application on the Dev environment
    • Remove the Content DB of the new Web app using stsadm.exe delete command
    • Attach the Content DB using Stsadm.exe addcontent database command.
    • After adding the content DB I see Site Collection count is zero.
    • So we ran the stsadm -o execadmsvcjobs but still it did not help.
    • After that we did Cache.ini reset but still no luck.

     

    Note:

    Database Size of Content DB is -->125 GB

    Transaction Log file size -->3GB

    Both Prod & DB SQL Version are same.

     

    Can any one please suggest where other places I can trouble shoot to resolve this issue.

     

    Thanks in advance.

    Purvish Shah

     

    Friday, October 18, 2013 7:16 AM

Answers

All replies

  • Hello,

    Could you check if the content database-been used by any other web app.

    Use the switch and check assignnewdatabaseid,
    http://technet.microsoft.com/en-us/library/cc263422.aspx

    Cordially.
    Friday, October 18, 2013 8:03 AM
  • I tried giving new assignnewdatabaseid but that also did not help me to solve my issue.

    Will SharePoint version difference affect me to show the sites?

    As MOSS2007 Development version is -->12.0.0.6421

    MOSS 2007 Production version is -->12.0.0.6219

    Please advice?

    Purvish Shah

    Friday, October 18, 2013 11:19 AM
  • A version difference typically won't allow you to restore / attach databases from an earlier version of SharePoint, so I'm guessing that the Dev machine was upgraded to 12.0.0.6421 after the export.

    As you've already checked the timer jobs and the cache.ini, I'd offer up that you need to think about the account that you're restoring on.  Are you restoring on the farm account?

    Saturday, October 19, 2013 11:47 PM
    Answerer
  • Hi Steven,

    Issue Solved.

    There was an Primary key violation in the SharePoint_Config DB.

    For solving issue I implemented solution given in the below link,

    http://mrnasirali.wordpress.com/2010/07/05/current-number-of-sites-is-0-in-central-admin-of-sharepoint/

    Regards,

    Purvish Shah

    • Marked as answer by PurvishS Wednesday, October 23, 2013 5:13 AM
    Wednesday, October 23, 2013 5:13 AM