Question

In the same Application server, I have Created new Web application and I'm trying to Mount the Restored Content Db of another WebApplication.
But in the end of the process it returns me the CurrentSiteCount = 0. It is running in the same server with all features installed. The new WEbApp is working fine, because if I try to Mount another content_DB everything works well.

If I try to do the same process in another environment using this restored Content Db, it finds the Right amount o Sites and SC. Even if nothing works because of features and many other things.

PS C:\Users\mossadm>  Mount-SPContentDatabase -Name WSS_Content  -DatabaseServer [Servername]-WebApplication site.com:8888/ 


Id               : 0c9934ae-fea5-41c4-9dd8-b8f7e8d2b1f7
Name             : WSS_Content
WebApplication   : SPWebApplication Name=[Name]


   Server           : [servername]

CurrentSiteCount : 0
Was it helpful?

Solution

Since the original site is in the same farm I would use the Backup-SPSite / Restore-SPSite commands. When the site is restored to a new location, it should be given a new ID.

You can also see this happen sometimes when bringing in a content databases and the root site is not available (because the current DB contains the root site collection). When this happens you can use the unattached method for backing up the site collections from the database and then restore them. for example below would access unattached DB (technically get's attached to Central Admin when you run this) and list the sites in the DB.

Get-SPContentDatabase -ConnectAsUnattachedDatabase -DatabaseName <name of imported DB> | Get-SPSite -limit all;

OTHER TIPS

As per my experience, I don't think you can make of a copy of content DB with in same farm even with the different web app. because it contains the site collections IDs which will remain same even making the copy. Config db have those ids that why you cant see any site collection in new restored db.

You can restore it to different farm.

In order to prove it detach the old db abd attach the new one and you will see the all site collections.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top