Issues in cloning a SharePoint 2013 Content Database and Mounting to the same SharePoint Farm.


Following are some scenarios where you may have to clone the Content Databases because of the Site Collections being so large that you can not use Site Collection backups as they are unsupported for Site Collection sizes over 100GB. 

So, I did a few lab exercises assuming different situations, by cloning Root and Additional Content Databases and mounting them using -AssignNewDatabaseId option to determine best possible options available without breaking the site functionality and not affecting 'site mapping' configurations.



I am referring the Content Database with 'top-level' site collection as a 'root Content Database', the rest of content databases existing in Web Application as 'Additional Content Database'

Following are situations in this blog post discussion:  


Content Databases:
As we knew that every SharePoint Content Database has a Unique Id and the Content Database ID will be saved in "Database Information Table" in Content Database. Also, when a New Site Collection is created in any of the Web Application, or an existing Content Database is mounted to the SharePoint Farm, the 'Objects' table in Configuration Database gets updated with the 'Database ID' and 'Site Map' table gets updated with the 'Site Collection' details with URL mappings, Web Application and Content Database details.
As a default SharePoint Architecture,
Following is a workarounds to overcome issues with 'Site Id' Conflicts if you are trying to duplicate a content database and you want to keep one unique Site Collection in each Content Database and avoid conflicts with 'Site Ids', using –AssignNewDatabaseId.
To Conclude, AssignNewDatabaseId will only sets a New Database ID to the Content Database, but it will not set new 'Site Id's for existing site collections. So, you will have to work with several additional steps to not to make site Collections orphaned. Please also make a note that the workarounds may or may not not work in all scenarios and they may not be fully supported by Microsoft.
Note: Please do not duplicate/Clone (Backup Database and restore with different name) and attach to the farm using -AssignNewDatabaseId parameter without having a thorough understanding of the SharePoint Architecture at Site Mapping functionality and Configuration Database level. Workarounds explained above are for specific scenarios are validated against out-of-the box Site Collections having no customization. So, the workarounds may not be applied in your case and may leave your sites as orphans and also may cause an unrecoverable damage. Please consult an experienced professional for best guidance in your case.