I have a test environment which has a different URL and a different database server than the production environment. I’ve taken a backup of the production content database of mysite and attached it to my test Sql Server. I’ve checked that the administrator accounts we use (sp_admin, sp_app) are db-owners, but still it all fails.
I’ve tried to run a script (see below), to see if I could get any lead, but it seems that the site collections on the web application does not exist.
$siteUrl = Read-Host "Enter Site URL"
$rootSite = New-Object Microsoft.SharePoint.SPSite($siteUrl)
$spWebApp = $rootSite.WebApplication
foreach($site in $spWebApp.Sites)
{
foreach($siteAdmin in $site.RootWeb.SiteAdministrators)
{
Write-Host "$($siteAdmin.ParentWeb.Url) - $($siteAdmin.Name)"
}
$site.Dispose()
}
$rootSite.Dispose()
Production server result:
Test server result:
And if I try to add/change the site collection administrator of mysites, the site is not there either. I’m running out of options, and would as next step lose the content database, create a new My Site instance and start from scratch (using the guide Configuring My Site in SharePoint 2010).
Edit
The Database is mounted correct:
The best option would be to solve the current issue, but is it possible? Where do I start looking for a solution to this problem?