Then I tried to restore a site collection from a backup to http://www.mmasood.com/sites/trainingByMM and it was giving below error:
I tried to restore the site collection to another web-application
and it was successful. So I started looking the differences of configuration of
both web-applications and I found the one web-application for which PowerShell
was complaining, has got multiple databases attached to it.
so what I did to restore the site collection is that I created another
Content Database called “WSS_Content_NewSiteCollection” and attached to desired web-application as shown below:
then executed the following command
Restore-SPSite http://www.mmasood.com/sites/trainingByMM
-Path C:\temp\exportedSite\SiteBackup.bak –DatabaseServer <DBServerName>
-DatabaseName WSS_Content_NewSiteCollection –Force
And this time PowerShell did not complain it and created my
site collection.