none
Root site collection not listed in site collection list after database refresh

    Question

  • I created a new web application in my Dev farm and then created a new site collection at the root level.  I ran the preparetomove command in STSADM on the new Dev content database.

    Next, I requested that our DBA refresh the newly created content database from a Production SQL backup.  There are 3 site collections in this Production backup - the root site collection, people, and sites/people.  

    After the refresh, I did the STSADM command to addcontentdb back to my new web app.  The only content that is accessible and displaying in the site collection list in Central Admin are "people" and "sites/people".  The root site collection holding all of our collaboration portal sites is not listed, but I've verified that the content is in the database. 

    This is the first time I've seen this happen.  Both the Dev farm and Production farm have MOSS 2007, SP1 and Infrastructure updates. 

    Tuesday, April 14, 2009 9:39 PM

Answers

  • Not sure I completely understand all the details here but you can't attach 2 copies of the same contentdb to the same farm.
    John
    SharePoint911: SharePoint Consulting
    Blog: http://www.rossonmoss.com
    Twitter: JohnRossJr

    MOSS Explained: An Information Workers Deep Dive into Microsoft Office SharePoint Server 2007
    Tuesday, April 21, 2009 9:19 PM
  • I'm not sure I completely understand the issue. My suggestion is to remove ever single content database from every single _Content_ web app in the farm. Don't muck with Central Admin, and don't muck with anything that has "SSP" in the name. They'll bite you. After all of your _Content_ web apps are naked, start adding back ContentDBs one at a time and checking all of your site collections. In your shuffling around you've gotten two ContentDBs with the same GUID or two Site Collections with the same GUID, or two databases that both have the site collection / in them in your farm at the same time. Adding them one at a time and hitting every site collection each time should narrow down where the conflict is.

    tk
    Tuesday, April 21, 2009 9:26 PM
  • By the way, I'm trying to put this content from Production in 2 separate web apps on the same Test server.   My existing Test App #1 has the production content and I get this 5763 because I'm trying to create Test App #2 by refreshing the production content into it's content database. 

    This blog article I found says that it is not recommended/possible to do this - http://sharepoint.orcinus-orca.eu/archives/date/2007/11/09

    However, several months ago I got production content into 2 web apps running on my development farm, but I do not know how I got around the 5763 primary key error in that case and am unable to do the same thing again even in that farm.

    I do not want to delete my Test App #1 in order to get Test App #2 to work.  Is there some type of modification I can make after the refresh to my content database, but before trying to attach the database to my #2 web app?  I already tried using -assignnewdatabaseID parameter with addContentDb, but that does not work. 

     

    MVP: Todd Klindt gives us a good way to narrow down the issue.

     

    If I understand correctly, you scenario is as follows:

    1.    A content database which contains a site collection had attached from the Production to in Test App #1.

    2.    Attached the content database contains the same site collection to Test App #2

    3.    You got 5736 error and the site collection was not existed in Test App #2.

     

    This is a by design behavior of SharePoint, it is not allowed to add more than one identical site collections to the SiteMap table of the configuration database.

    Because SharePoint use GUID to identify the site collections, even if you changed the content database GUID by –assignnewdatabaseID parameter and attached it to a different web application, the site collection GUID would not be changed.

     

    A workaround is using stsadm –o export / import command to migrate the site collection as the export / import commands will not retain the GUID.

     

    For more information, please refer to:

    l  Export: Stsadm operation (Office SharePoint Server)

    l  Import: Stsadm operation (Office SharePoint Server)

     

     

    Let me know if you need further assistance.

    -lambert



    Lambert Qin | Microsoft Online Support Engineer
    How to ask a question in the forum (http://support.microsoft.com/kb/555375)
    Posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, April 22, 2009 9:16 AM

All replies

  • Hi,

     

    Based on my understanding, your scenario is as follows:

    1.    Create a web application in Dev farm and create a new site collection at the root level of the web application.

    2.    Restore a the content database backup from Production farm, there are 3 site collections in the content database, one is at the root level, the other two are not.

    3.    After attaching the database to the web application in Dev farm, the root level site collection is not listed in the newly added content database.

     

    Please feel free to let me know if I misunderstanding your issue.

     

    In your issue, you created a site collection at the root level of the original web application before attaching the content database.

    The site collection would not be displayed in the newly added content database because there is a conflict between the two root level site collections.

     

    As you verified, SharePoint will not delete the root level site collection from the newly added content database.

     

    To resolve your issue, you could take the following steps:

    1.    Removed the two content databases from the web application in Dev farm (the step will not delete the content database from the Database server).

    2.    Add the content database that restored from Production environment back to the web application.

     

     

    Let me know if you need further assistance.

    -lambert


    Lambert Qin | Microsoft Online Support Engineer
    How to ask a question in the forum (http://support.microsoft.com/kb/555375)
    Posting is provided "AS IS" with no warranties, and confers no rights.
    Thursday, April 16, 2009 9:21 AM
  • Hi,

     

     

    As you verified, SharePoint will not delete the root level site collection from the newly added content database.

     

    To resolve your issue, you could take the following steps:

    1.    Removed the two content databases from the web application in Dev farm (the step will not delete the content database from the Database server).

    2.    Add the content database that restored from Production environment back to the web application.

     

    Hi Lambert,

    What I verified above is that the backup from Production that was refreshed into my Dev databases does indeed contain the root site collection (sites/subsites).  

    There is only 1 content database here, not 2.  I am confused by your recommended solution.   I always detach the content database within Central Admin, the SQL DBA does a refresh of content from the Prod backup into my 1 new content database, then I reattach the newly refreshed content database back to the DEV farm. 

    This has worked in the past, I am not sure why the root site collection is not displaying in Central Admin and is inaccessible.  I believe I am already doing things exactly as you provided in your recommendation.  Please let me know if I am understanding you correctly.

    Our SQL DBA has told me that the schema name of our  Prod database and the schema name of our DEV database does not match.  Is this an issue?  How do I resolve it if it is?

    Thank you.

    Friday, April 17, 2009 2:50 PM
  • Hi,

     

    Thanks for your update.

     

    You had one 1 content for the web application, so the reason was not the conflicted root site collections.

     

    Based on my test, the differences of the schema may result in “Login failed” error in the event viewer.

    Could you please verify whether there are any errors logged in the Event Viewer?

     

    Because the attached database worked before, so another possibility was the features deployed in the Production environment were not the same with Dev environment.

    Could you please verify this is the cause of the issue too?

     

    I also created a workplace for you, please try to reproduce the issue, and upload the ULS logs that record the issue to me for further research.

    If the content database do not contain sensitive data, It is appreciated to upload the content database backup file to the workspace and let me do more research in my local.

     

    Workspace URL: (https://sftus.one.microsoft.com/ChooseTransfer.aspx?key=e8b7308c-1ddc-4a30-b3e8-a4a4d9fde893)

    Password: hUmfm8lxF5

     

    Let me know the result if possible.

    -lambert


    Lambert Qin | Microsoft Online Support Engineer
    How to ask a question in the forum (http://support.microsoft.com/kb/555375)
    Posting is provided "AS IS" with no warranties, and confers no rights.
    Monday, April 20, 2009 9:18 AM
  • Lambert - I'm waiting on management here to give me approval to upload the content database. 

    I do not see "Login failed" in the event viewer.  I cannot compare deployed features against production because it says the dev root site does not exist.  

    While I'm waiting on management approval, I'm going to try to create a new web app in a different server farm and refresh the content to it from the production backup to see if I get the same results.

    It may take a few days to get approval, will that upload workspace and password be valid through the rest of this week? 

    Thanks

    Monday, April 20, 2009 2:22 PM
  • Hi,

     

    Thanks for your update.

     

    I will keep the workspace open for a month. Please feel free to upload the content database when you got the approval.

     

    It is appreciated if you could do some tests with another web application.

    Please capture the ULS is located in %CommonProgramFiles%\Microsoft Shared\web server extensions\12\LOGS and upload to the workspace if the same error existed in the web application.

     

    Thanks for your cooperation

    -lambert


    Lambert Qin | Microsoft Online Support Engineer
    How to ask a question in the forum (http://support.microsoft.com/kb/555375)
    Posting is provided "AS IS" with no warranties, and confers no rights.
    Tuesday, April 21, 2009 10:23 AM
  • There are known issues with running preparetomove with servers on Infrastructure Update and newer. Take a look at this and see if it helps:
    http://blogs.msdn.com/toddca/archive/2009/01/30/preparetomove-away-from-running-this-command.aspx


    John
    SharePoint911: SharePoint Consulting
    Blog: http://www.rossonmoss.com
    Twitter: JohnRossJr

    MOSS Explained: An Information Workers Deep Dive into Microsoft Office SharePoint Server 2007
    Tuesday, April 21, 2009 12:11 PM
  • There are known issues with running preparetomove with servers on Infrastructure Update and newer. Take a look at this and see if it helps:
    http://blogs.msdn.com/toddca/archive/2009/01/30/preparetomove-away-from-running-this-command.aspx


    John
    SharePoint911: SharePoint Consulting
    Blog: http://www.rossonmoss.com
    Twitter: JohnRossJr

    MOSS Explained: An Information Workers Deep Dive into Microsoft Office SharePoint Server 2007

    Hi John,

    I noticed that the column 'Moving' was indeed set to True.  However, since SharePoint does not recognize my root site, I could not run the preparetomove command with the -undo parameter.  So I just created a new SSP, created a new web app and assigned it to my 2nd newly-created SSP, refreshed the content database from a prod backup and then added the content db.  I verified on the new SSP database that the 'Moving' column was set to False.  The same issue is occurring, my root site collection is missing still.  

    Tuesday, April 21, 2009 6:27 PM
  • Hi,

     

    Thanks for your update.

     

    I will keep the workspace open for a month. Please feel free to upload the content database when you got the approval.

     

    It is appreciated if you could do some tests with another web application.

    Please capture the ULS is located in %CommonProgramFiles%\Microsoft Shared\web server extensions\12\LOGS and upload to the workspace if the same error existed in the web application.

     

    Thanks for your cooperation

    -lambert


    Lambert Qin | Microsoft Online Support Engineer
    How to ask a question in the forum (http://support.microsoft.com/kb/555375)
    Posting is provided "AS IS" with no warranties, and confers no rights.

    I tested with a new web application and with a new SSP, but it did not work.  Root site collection does not display in Central Admin.  The sites and content are in the database though, just inaccessible.

    I am uploading the backup files to the workspace.  There's 6 of them, and it's going pretty slow.  I'll also upload the SharePoint log file displaying the error. 

    By the way, the error that I see when I reattach the content database is event ID 5763:

    Event Type: Error
    Event Source: Windows SharePoint Services 3
    Event Category: Database
    Event ID: 5763
    Date:  4/21/2009
    Time:  8:57:14 AM
    User:  N/A
    Computer: ServerName
    Description:
    Primary key violation on SQL Server instance 'SQLServerName\TestInstance' in database 'Test_sp_config'. Additional error information from SQL Server is included below.

    Violation of PRIMARY KEY constraint 'PK_SiteMap'. Cannot insert duplicate key in object 'dbo.SiteMap'.
    The statement has been terminated.

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


    Tuesday, April 21, 2009 6:37 PM
  • By the way, I'm trying to put this content from Production in 2 separate web apps on the same Test server.   My existing Test App #1 has the production content and I get this 5763 because I'm trying to create Test App #2 by refreshing the production content into it's content database. 

    This blog article I found says that it is not recommended/possible to do this - http://sharepoint.orcinus-orca.eu/archives/date/2007/11/09

    However, several months ago I got production content into 2 web apps running on my development farm, but I do not know how I got around the 5763 primary key error in that case and am unable to do the same thing again even in that farm.

    I do not want to delete my Test App #1 in order to get Test App #2 to work.  Is there some type of modification I can make after the refresh to my content database, but before trying to attach the database to my #2 web app?  I already tried using -assignnewdatabaseID parameter with addContentDb, but that does not work. 

    Tuesday, April 21, 2009 7:38 PM
  • Not sure I completely understand all the details here but you can't attach 2 copies of the same contentdb to the same farm.
    John
    SharePoint911: SharePoint Consulting
    Blog: http://www.rossonmoss.com
    Twitter: JohnRossJr

    MOSS Explained: An Information Workers Deep Dive into Microsoft Office SharePoint Server 2007
    Tuesday, April 21, 2009 9:19 PM
  • I'm not sure I completely understand the issue. My suggestion is to remove ever single content database from every single _Content_ web app in the farm. Don't muck with Central Admin, and don't muck with anything that has "SSP" in the name. They'll bite you. After all of your _Content_ web apps are naked, start adding back ContentDBs one at a time and checking all of your site collections. In your shuffling around you've gotten two ContentDBs with the same GUID or two Site Collections with the same GUID, or two databases that both have the site collection / in them in your farm at the same time. Adding them one at a time and hitting every site collection each time should narrow down where the conflict is.

    tk
    Tuesday, April 21, 2009 9:26 PM
  • By the way, I'm trying to put this content from Production in 2 separate web apps on the same Test server.   My existing Test App #1 has the production content and I get this 5763 because I'm trying to create Test App #2 by refreshing the production content into it's content database. 

    This blog article I found says that it is not recommended/possible to do this - http://sharepoint.orcinus-orca.eu/archives/date/2007/11/09

    However, several months ago I got production content into 2 web apps running on my development farm, but I do not know how I got around the 5763 primary key error in that case and am unable to do the same thing again even in that farm.

    I do not want to delete my Test App #1 in order to get Test App #2 to work.  Is there some type of modification I can make after the refresh to my content database, but before trying to attach the database to my #2 web app?  I already tried using -assignnewdatabaseID parameter with addContentDb, but that does not work. 

     

    MVP: Todd Klindt gives us a good way to narrow down the issue.

     

    If I understand correctly, you scenario is as follows:

    1.    A content database which contains a site collection had attached from the Production to in Test App #1.

    2.    Attached the content database contains the same site collection to Test App #2

    3.    You got 5736 error and the site collection was not existed in Test App #2.

     

    This is a by design behavior of SharePoint, it is not allowed to add more than one identical site collections to the SiteMap table of the configuration database.

    Because SharePoint use GUID to identify the site collections, even if you changed the content database GUID by –assignnewdatabaseID parameter and attached it to a different web application, the site collection GUID would not be changed.

     

    A workaround is using stsadm –o export / import command to migrate the site collection as the export / import commands will not retain the GUID.

     

    For more information, please refer to:

    l  Export: Stsadm operation (Office SharePoint Server)

    l  Import: Stsadm operation (Office SharePoint Server)

     

     

    Let me know if you need further assistance.

    -lambert



    Lambert Qin | Microsoft Online Support Engineer
    How to ask a question in the forum (http://support.microsoft.com/kb/555375)
    Posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, April 22, 2009 9:16 AM
  • If I understand correctly, you scenario is as follows:

    1.    A content database which contains a site collection had attached from the Production to in Test App #1.

    2.    Attached the content database contains the same site collection to Test App #2

    3.    You got 5736 error and the site collection was not existed in Test App #2.

     

    This is a by design behavior of SharePoint, it is not allowed to add more than one identical site collections to the SiteMap table of the configuration database.

    Because SharePoint use GUID to identify the site collections, even if you changed the content database GUID by –assignnewdatabaseID parameter and attached it to a different web application, the site collection GUID would not be changed.

     

    A workaround is using stsadm –o export / import command to migrate the site collection as the export / import commands will not retain the GUID.

     

    For more information, please refer to:

    l  Export: Stsadm operation (Office SharePoint Server)

    l  Import: Stsadm operation (Office SharePoint Server)

     

     

    Let me know if you need further assistance.

    -lambert



    Lambert Qin | Microsoft Online Support Engineer
    How to ask a question in the forum (http://support.microsoft.com/kb/555375)
    Posting is provided "AS IS" with no warranties, and confers no rights.

    Yes, the scenario you describe is exactly the problem.  I was under the impression that it was possible though because I had somehow accomplished getting the same content in 2 web apps in my Dev farm.  This was several months ago, and I must have used export/import at that time and just forgot. :)  

    Please delete the databases I had started to upload to that workspace. 

    Thank you to everyone for their replies and assistance. 
    Wednesday, April 22, 2009 1:43 PM