Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a Sharepoint Farm and I want a clone of it, under a different hostname (Preprod vs. prod).

We setup the Preprod farm from scratch, with new Web Applications. We then restored a backup of the WSS_Content database and attached it using Central Admin.

When browsing the main site collection (/), I get a HTTP 404 not found. If i go into Central Admin and View All Site Collections, I don't even get the box that has the URL, Title, Description etc. fields. When trying to get to it from PowerShell using Get-SPSite and site.OpenWeb(), it's not returning a site.

Other site collections work fine though, and there is nothing obvious in the logs, so I really don't know where the 404 comes from and how to troubleshoot it.

share|improve this question

2 Answers 2

up vote 0 down vote accepted

At the end, the issue was that the target web application didn't have the exact same Managed Paths setup. Apparently, if they don't match, attaching the database creates the wrong IDs in the SiteMap table within the Config database.

share|improve this answer

You'll need to detach and re-attach your content database.

If you go to the central administration and your site collection information are missing do the following (Post restoration of your database)

Stsadm -o deletecontentdb -url {Site Url} -databasename {Content Database Name}
Stsadm -o addcontentdb -url {Site Url} -databasename {Content Database Name}

Later on, for similar scenario, you should use stsadm -o export (-o import) functionalities or stsadm -o backup / restore if you want to avoid this (or the powershell equivalent)

Hope it helps.

share|improve this answer
    
The lack of information on the central admin sounds like a good candidate for a wrongly attached content database IMHO. Alternatively, I would fire a trusty Fiddler to see what's blocking and ensuring IIS is responding to the relevant binding on the pre-prod environment (btw, is a vanilla site working on the pre-prod on that specific site collection ?) –  Francois Verbeeck Jul 31 '12 at 20:16
    
got it, but my advice was to use stsadm -o backup or stsadm -o export rather than SQL Server content database backup. I'll clarify my answer. Thanks ! –  Francois Verbeeck Jul 31 '12 at 20:21
    
You're good, I was just telling him to ignore that. –  RJ Cuthbertson Jul 31 '12 at 20:21
    
Will try Farm backup and restore as well. Fiddler isn't a great help here, but I can confirm that I'm definitely hitting SharePoint. It seems like a problem actually fetching the site from the database. –  Michael Stum Jul 31 '12 at 20:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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