Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

How to restore a web application's database to another web application in the same farm in SharePoint 2016 On-Premises?

$
0
0

Hi,

I have created a new web application http://webapp2.

I created a backup of http://webapp1 database & restored it as "webapp1db" in SQL Server.

I want to restore "webapp1db" database to http://webapp2. 

http://webapp1 & http://webapp2 are in the same farm.

I have dismounted http://webapp2 default database using the following command:

Get-SPContentDatabase -WebApplication http://webapp2 | Dismount-SPContentDatabase

I mounted webapp1db database to http://webapp2 using the following commands:

Mount-SPContentDatabase webapp1db -WebApplication http://webapp2

Mount-SPContentDatabase webapp1db -WebApplication http://webapp2 -AssignNewDatabaseId

However, Site Collection Count is 0 for http://webapp2

I ran Test-SPContentDatabase & got following error:

Category        : SiteOrphan
Error           : True
UpgradeBlocking : False
Message         : Database [webapp1db] contains a site (Id = [078ddc4e....], Url = [/sites/TeamH]) whose id is already associated with a different 
                  database (Id = [ece8ca29....], name = [WSS_Content_6c439....]) 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.
Locations       : 

I tried upgrade-spcontentdatabase webapp1db also, but issue still remains.

Please provide solution to above issue ASAP.

Thanks in advance.


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>