Problem: You’re trying to upgrade your farm from MOSS 2007 to SharePoint Server 2010. When you run stsadm preupgradecheck tool, it reports the following:
Issue : Content database with modified database schemas
User modifications to the SharePoint content database, including but not limited to table schemas, index, stored procedures, are not supported and will cause upgrade to future versions of SharePoint to fail. The databases in the following list seem to have been modified from the original schema:
Data Source=YourDBServer;Initial Catalog=ProblemDB;Integrated Security=True;Enlist=False;Connect Timeout=15
If you did not make any manual changes to your database schemas, then see MS article http://technet.microsoft.com/en-us/library/cc262967.aspx.
Otherwise, you can resolve this issue by following the steps below. Make sure to test this out in your test environment and create backups of all production databases before making any changes.
1. Let’s say your problem database is called “ProblemDB”. In Central Administration, in the same web application where your ProblemDB resides, add a blank content database. Go to Central Admin site > Application Management > Content Databases. Switch to the web application in question, click on “Add a content database”. Use the same settings as your ProblemDB, but let’s call this database “GoodDB”.
2. Run the following command for each site collection found in the ProblemDB. This command will move site collections from ProblemDB to GoodDB.
stsadm -o mergecontentdbs -url <site collection URL> -sourcedatabasename ProblemDB -destinationdatabasename GoodDB -operation 2
3. Go to Central Admin site > Application Management > Content Databases and confirm that ProblemDB does not contain any sites. Remove ProblemDB in CA.
4. Restart IIS.
5. Run stsadm preupgradecheck tool again to confirm that the issue has been resolved.
Acknowledgements: I’d like to thank Joseph Yi (Datacure, Inc.) for proposing and developing this solution.
Note: If you did not make any manual changes to the database schema, you may want to reference the following Microsoft article:
Upgrading data from SharePoint Portal Server 2003: pre-upgrade checker reports corrupted databases
When a content database in an Office SharePoint Server 2007 farm was upgraded from a Microsoft Office SharePoint Portal Server 2003 content database, you might see the following error when you run the pre-upgrade checker:
Failed : Content database with modified database schemas
If you did not make any manual schema changes to the database, you can ignore this error and continue with the ugprade. This is a residual error from the upgrade process from SharePoint Portal Server 2003 to Office SharePoint Server 2007. For more information, see the Microsoft Knowledge Base article 954772.