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
  • Restored DB is from another farm? do you have another copy this db attached to farm? – Waqas Sarwar MVP May 26 '15 at 17:02
  • No. is from the same farm – hello B May 26 '15 at 17:02
  • same web app or different web app? – Waqas Sarwar MVP May 26 '15 at 17:04
  • The restored DB is from another Web app. – hello B May 26 '15 at 17:05

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;
  • will this attach sites in the central admin? – hello B May 27 '15 at 9:22
  • "technically" it is - but you can't browse sites. It's only a temporary action so you can pull sites out of the database. SharePoint takes care of the management of this behind the scenes. – Jesus Shelby May 27 '15 at 12:26
  • Thank you all for your help. Last question, is there a way to back and restore a Sp group with its users and Permission levels? – hello B May 28 '15 at 13:30
  • Unfortunately no - not out out of the box, you need 3rd party tool, or create one. Example see: geekswithblogs.net/bjackett/archive/2009/04/24/… – Jesus Shelby May 29 '15 at 13:52

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.

  • All right. that's why In another farm I can see the right Site Count Value. Do you know any way to solve all features missing into the new farm? is there any way migrate all features with PS? I see that some features have master page and other layout stuff – hello B May 26 '15 at 17:22
  • what type of features you have, if they are server level then you can deploy the soltuion int he 2nd farm – Waqas Sarwar MVP May 26 '15 at 17:29
  • Server level You mean farm scope? Globally deployed? – hello B May 26 '15 at 17:34
  • correct, you can check it from central admin, system settings>managed farm solutions....all others i.e custom template, designer change you have to manually apply it. – Waqas Sarwar MVP May 26 '15 at 17:41
  • So, by taking a look into logs, I see that the first problem to open the home page is a feature for the Master. Is there a way juts to change the master and apply the default master? – hello B May 26 '15 at 18:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.