I thought I would start putting my experiences from the field here when I encounter either a strange occurrence or when I pull my hair out trying to figure out something and it reveals something extraordinary.
I had one of “those” sessions—you know, the ones where you call Microsoft Premier Support and it lasts for a few days and you go through a couple of engineers…yeah, one of those sessions. Here is how it started:
My client is currently on SharePoint Portal Server 2003 and wants to migrate to SharePoint 2007. I created a project plan that called for a test environment and test migrations. I was provided with a test environment with copies of old databases. They were sufficient to perform the task of test migrations.
I *thought* it would be straightforward: run prescan, look at log file, detach database from SPS2003 and reattach in MOSS 2007 and fix the sites that were broken. Prescan was run, but I missed a line in the error log which proved to be the whole reason for me calling MSFT support. When I went to remove the content database from SPS2003, it wouldn’t drop. “hmmmm, thought I….maybe I need to do some repair first”. I run STSADM –o repairdatase and take a look—45,000 orphans…oh my. -deletecorruption had to be run 4 times to get <OrphanCount=”0”/> to show up in the log. I still can’t get it to work. ARRRGGGGHH…
Screw it, I go to the SQL Server and drop all connections and then see if the database will remove from SPS2003. NOPE. WTF!!?? I attempt to attach the database to MOSS and receive this error:
Interesting….it thinks that prescan hasn’t been run. I re-run it. Re-try to attach it…same error. This is really starting to bug me. So I built another SPS 2003 server and was able to attach and detach the database with no issues. That’s a relief. I ran Prescan and received an error. After reviewing the log I saw the line that changed everything:
12/28/2009 18:16:18 Checking if any site has not yet been scanned in Server="MOSSDBSERVER";Database="blahDB_Site";Trusted_Connection=yes;App="prescan.exe".
12/28/2009 18:16:18 Error: The following site has not been scanned. Id = dfa72d8b-1f51-4266-bf37-4964fc8063dc and Url = /sites/RESTORE_Projects
HMMMMM…..let me go to SQL and see what is happening there….and I see this in the db.Sites table:
So prescan was iterating through the sites table and sees the BitFlag set to zero. I figure if the sites whose BitFlag set to zero were deleted from the database, Prescan would finish completely—with errors, but completely. That’s when MSFT support started ranting and raving…NO NO NO NO NO NO NO NO….OK Ok…I get it
So we spend three days straight (holidays in the mix) trying to get a workaround…no dice.
They acquiesce…OK…”Change the BitFlag value”. Save the changes reboot for good measure. Go to the original SPS2003 server and the database drops like it is supposed to when I click “Remove Content Database” in Central Admin.
I then go to the MOSS server and attach the database…it took four hours and two tries, but the sites came up (except for the home portal site) but it worked.
Now comes the task of the 458 unghosted sites….