Preamble
There are a lot of different of different scenarios, issues and methodologies realated to upgrade from Sharepoint 2003 to 2007 (WSS or SPS).
Generally:
- Check the service pack of SPS 2003 to match the prerequisites;
- Backup the existing Sharepoint databases
- Launch prescan /all on your server to be upgraded to check that Sharepoint is ready to be upgraded. You can find this utility on an 2007 installation under <%root%>\program files\common files\Microsoft Shared\web service extenstions\12\bin directory and copy it to the 2003 installation (allowing you to execute it);
- Manually fix all the errors found from Prescan;
- Proceed with the upgrade (accordingly to Microsoft brest practice);
Usually every time you'll find different errors depending to the Sharepoint topology and configuration.
This morning, I've found the following errors migrating WSS 2.0 to WSS 3.0:
- Launching prescan /all the log files was:
..............
12/11/2008 10:35:47 Scanning SPWeb: http://customer-server/test
12/11/2008 10:35:47 Updating list schema in web.
12/11/2008 10:35:47 Scanning SPWeb: http://customer-server/xyz
12/11/2008 10:35:47 Unghosted page: http://customer-server/xyz/default.aspx.
12/11/2008 10:35:47 Unghosted page: http://customer-server/xxx/SharedAreas/Forms/AllItems.aspx.
12/11/2008 10:35:47 Unghosted page: http://customer-server/xyz/Lists/Available Areas/AllItems.aspx.
12/11/2008 10:35:47 Updating list schema in web.
12/11/2008 10:35:47 Scanning SPWeb: http://customer-server/zz
12/11/2008 10:35:47 Updating list schema in web.
12/11/2008 10:35:47 Checking if Server="customer-server";Database="customer-content-database";Uid="userid";Pwd="userpwd";App="prescan.exe" is a WSS V2 SP2 database.
12/11/2008 10:35:47 Checking if any site has not yet been scanned in Server="customer-server";Database="customer-content-database";Uid="userid";Pwd="userpwd";App="prescan.exe".
12/11/2008 10:35:47 Error: The following site has not been scanned. Id = ef24fe63-efdf-42b7-b431-a9ae04abc24a and Url = /
12/11/2008 10:35:47 Checking if any list has not yet been scrubbed in Server="customer-server";Database="customer-content-database";Uid="userid";Pwd="userpwd";App="prescan.exe".
12/11/2008 10:35:47 Error: The following list has not been scrubbed: Id = b5f896c9-8f1c-40d2-9282-1154ccbaf6cb, Name=Web part galleries, Containing Web=
12/11/2008 10:35:47 Error: Prescan has encountered sites or lists that were not updated because they cannot be accessed using the SharePoint Products and Technologies object model. The most likely reasons for Prescan to skip a list are covered in the Knowledge Base article at: http://go.microsoft.com/fwlink/?linkid=69958&clcid=0x409.
12/11/2008 10:35:47 Skipping virtual server: http://customer-server:81/. Server state = NeedExtend. Most likely this virtual server is not extended with WSS v2.
12/11/2008 10:35:47 Scan finished with failure.
12/11/2008 10:35:47 ===============================Logs===============================
12/11/2008 10:35:47 Log file: C:\DOCUME~1\sts_test\LOCALS~1\Temp\2\PreupgradeReport_633645885183825054_Log.txt
12/11/2008 10:35:47 Summary file: C:\DOCUME~1\sts_test\LOCALS~1\Temp\2\PreupgradeReport_633645885183825054_Summary.xml
12/11/2008 10:35:47 ==============================Totals==============================
12/11/2008 10:35:47 Number of sites skipped (already scanned): 0
12/11/2008 10:35:47 Number of sites scanned: 2
12/11/2008 10:35:47 Number of broken sites: 0
12/11/2008 10:35:47 Number of webs scanned: 554
12/11/2008 10:35:47 Number of broken webs: 0
12/11/2008 10:35:47 Number of webs using custom template: 0
12/11/2008 10:35:47 Number of pages scanned: 5848
12/11/2008 10:35:47 Number of unghosted pages: 1606 (27,46% of total).
.......
Usually the first thing you've to do with this kind of problem is trying to fix them with:
STSADM -o databaserepair -url http://customer-server -databasename customer-content-database
With this command all the orphaned entities in Sharepoint content database are found and fixed (removed).
The problem is that SOMETIMES stsadm is unable to find orphans so that prescan doesn't complete succesfully and you cannot upgrade...
To fix that you can MANUALLY force orphans in the content database directly working with Sharepoint database tables.
The idea is getting the entities id from the prescan log file (in our example the site with id=ef24fe63-efdf-42b7-b431-a9ae04abc24a and the list with id=b5f896c9-8f1c-40d2-9282-1154ccbaf6cb).
For force the orphans connect to Sharepoint content database and executes the above sql commands:
use customer-content-database
delete lists where tp_id='b5f896c9-8f1c-40d2-9282-1154ccbaf6cb'
delete sites where Id='ef24fe63-efdf-42b7-b431-a9ae04abc24a'
Now go back to the command line shell and execute:
STSADM -o databaserepair -url http://localhost -databasename customer-content-database -deletecorruption
So that you will the orphans removed.
Now you can launch prescan /all and it should run succesfully.
Keep in mind that you've to manually fix each error discovered by prescan. Each time you've to find a workaround! This SQL code must be adapted to you scenario and you should have to deal with others Sharepoint tables!