CurrentSiteCount : 0 :: We have restored the sharepoint content database into same instance.

Rahul Gollapalli 136 Reputation points

Dear Team,

We have SharePoint 2013 farm and SQL 2014, we are trying to replicate the Sharepoint web application.

As per developer requirements, we are trying to replicate one web application into the same SharePoint farm and the same instance.

  1. Take the backup of the content database from Instance SQLDB14\UAT_X.
  2. create the web application with different port numbers on the same existing web application farm.
  3. Restored the content database into the default database which means we have a database while created with the web application on instance SQLDB14\UAT_X.

Up to here, everything is fine.
Now web application is showing a site collection count 0
DIsmount, Mount is done.

Id : 7437e-999f-c351ed9
Name : New_6345
WebApplication : SPWebApplication Name=New_6345
Server : SQLDB14\UAT_X
CurrentSiteCount : 0

We understand that blocking is due to the same site and ID already existing on the same farm on different databases and differ web application

Category : SiteOrphan
Error : True
UpgradeBlocking : False
Message : Database [New_6345] contains a site (Id = [xxxxxxx-39f9-42ea-9677-01b85f19xxxxx], Url = [/])
whose id is already associated with a different database (Id =
[xxxxxxxx-2f75-46c8-bd6d-5a08ef0xxx], name = [WSS_Content_y]) in the site map. Consider
deleting one of these sites which have conflicting ids.
Remedy : The orphaned sites could cause upgrade failures. Try detach and reattach the database which contains
the orphaned sites. Restart upgrade if necessary.

Please provide the possibility to resolve this issue without deleting the existing database and moving this web application or database to some other server.

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,253 questions
SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,843 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Xuyan Ding - MSFT 7,561 Reputation points

    Hi @Rahul Gollapalli ,

    Actually you know the problem, the site collection GUID is unique to the SharePoint farm. Even if they are in different content databases and different web applications. In fact, the most important key point of this problem is that you can't use content database backup, because it will cause the wrong site ID in the same farm.

    You need to delete the existing site collection that is causing the GUID conflict issue, backup the site collection, restore it to the new web app (database required in production) via PowerShell commands. This will change the GUID of the restored site.

    Here is an article for the operation details of the above steps for your reference: How to Copy a Site Collection in SharePoint?
    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.