SharePoint Database errors
I am working with MOSS 2007 Service Pack 2 with SQL Server 2005. I've had some issues with corrupted content databases. I worked with Microsoft to resolve the issue with two of the smaller databases. They had me export the databases into a new SharePoint application, and then switch out the old database for the new database. This worked fine for the smaller databases, but I have two larger databases, 1 of them is 45 GB and the other is 121 GB. I have run into numerous problems trying to export these databases, and I'm hoping for some advice. After running DBCC CECKDB on the 121 GB db I get that there are 33 consistency errors, and on the 45 GB database I get that there are 7 allocation errors. Can anyone tell me how serious these errors are? I don't get any SharePoint log errors or event errors on these 2 particular databases. If I leave them alone will it cause serious problems down the line?Also, am I correct in thinking that SQL Server 2008 does allow you repair SharePoint content databases using DBCC CHECKDB?
March 8th, 2010 10:41pm

Hi Holly,What parameters did you run DBCC CHECKDB with? No, you dont have to have SQL2008 to repair DBs. However, you should look into why and how they are becoming corrupt, so it doesnt recurr.. You have always had the ability to repair DBs, the tools are better with each release and there is less chance of corruption. DBCC CHECKDB REPAIR_FAST Performs minor, nontime-consuming repair actions such as repairing extra keys in nonclustered indexes. These repairs can be done quickly and without risk of data loss.DBCC CHECKDB REPAIR_REBUILD Performs all repairs done by REPAIR_FAST and includes time-consuming repairs such as rebuilding indexes. These repairs can be done without risk of data loss.DBCC CHECKDB REPAIR_ALLOW_DATA_LOSS Performs all repairs done by REPAIR_REBUILD and includes allocation and deallocation of rows and pages for correcting allocation errors, structural row or page errors, and deletion of corrupted text objects. These repairs can result in some data loss. The repair may be done under a user transaction to allow the user to roll back the changes made. If repairs are rolled back, the database will still contain errors and should be restored from a backup. If a repair for an error has been skipped due to the provided repair level, any repairs that depend on the repair are also skipped. After repairs are completed, back up the database.Allocation and Consistency issues will more than liekly be resolved with DBCC CHECKDB REPAIR_REBUILD and many times using DBCC CHECKDB REPAIR_FAST... DBCC CHECKDB REPAIR_FAST really is pretty fast and is probably a good place to start... Since you are running SP2 i would also run stsadm -o preupgradecheck to ensure there are not any orphans or if there are repair them. But I would run the SQL repairs firstReferencehttp://msdn.microsoft.com/en-us/library/aa258278(SQL.80).aspx-IvanIvan Sanders My LinkedIn Profile, My Blog, @iasanders.
Free Windows Admin Tool Kit Click here and download it now
March 14th, 2010 11:08am

Hi Ivan,Thanks for responding, but I have spoken with both the SQL Team and the SharePoint team at Microsoft and all said that MOSS 2007 databases can not be repaied in SQL Server 2005. They said that the corrupted site collections have to be exported and then imported into a new SharePoint application. I think I spoke with 5 people in all from Microsoft Support and all said the same thing. I have tried to repair a small SharePoint database using dbcc checkdb in SQL Server 2005 and it will run for days and never stop.
March 16th, 2010 10:19pm

Hi Holly,I am not sure who your references are when yu say SQL Team and SharePoint Team, didf they send you references, did you open an SRX I have included references below that go through the maintenance plans and what you should be doing...If there are corrupt site collections, thats definitely not a good thing, my experience is that if they are corrupt or orphaned the best thing to do is get rid of them. But prior to that I would ask you to be specific about why you think they are corrupt? I have included a few references from teh Microsoft SharePoint Team Blog, a the white paper from Bill presents only the SQL Server 2008 or SQL Server 2005 options in detail. Database Maintenance for SharePoint Whitepaper Bill Baer’s white paper: Database Maintenance for SharePoint is now live. Here's a sneak peak into the contents. Kudos Bill! This level of content is outstanding! CHECK FOR AND REPAIR CONSISTENCY ERRORS BY USING DBCC CHECKDBAbout DBCC CHECKDBDBCC CHECKDB and performanceMEASURE AND REDUCE FRAGMENTATIONMeasure fragmentation in a SQL Server 2005 database (sys.dm_db_index_physical_stats)Measure fragmentation in a SQL Server 2000 database (DBCC SHOWCONTIG)Reducing Fragmentation for a DatabaseReducing fragmentation for a specific table and its indexesUsing ALTER INDEXFine tuning index performance by setting fill factorShrinking data filesShrinking a database by using Transact-SQL commandsShrinking a database by using SQL Server 2005 Management StudioCREATING SQL SERVER 2005 MAINTENANCE PLANSConfigure a SQL Server 2005 Database Maintenance Plan You can reorganize and rebuild indexes by using the SQL Server 2008 or SQL Server 2005 ALTER INDEX statement, the SQL Server 2008 or SQL Server 2005 Maintenance Wizard, the SQL Server 2000 DBCC INDEXDEFRAG and DBCC DBREINDEX statements, or the SQL Server 2000 Maintenance Wizard. References · Support for changes to the databases that are used by Office server products and by Windows SharePoint Services · Information about the Maintenance Plan Wizard in SQL Server 2005 and about tasks that administrators can perform against SharePoint databases · http://blogs.msdn.com/sharepoint/archive/2008/02/28/database-maintenance-for-sharepoint-whitepaper.aspx · http://www.microsoft.com/downloads/details.aspx?FamilyID=ae7387c3-348c-4faa-8ae5-949fdfbe59c4&displaylang=en I hope this helps... Cheers, -Ivan Ivan Sanders My LinkedIn Profile, My Blog, @iasanders.
Free Windows Admin Tool Kit Click here and download it now
March 17th, 2010 6:23am

Hi Ivan, When I say SharePoint and SQL Team I mean Microsoft phone support. Microsoft splits them into teams. I figured that they knew what they were talking about. Two representatives from the SharePoint team said that since the corruption had gone on for so long and we were unwilling to restore from an older backup that since they were SharePoint databases that they had to be exported and then imported into a new SharePoint application. They then had me detach the database from the new application and attach it to the old site collection. They claimed that this was the only way to resolve SharePoint database errors. I'm really disappointed that they sent me in this direction if it was as simple and repairing the database in SQL Management. I will take a look at the information you sent me. Thanks.
March 19th, 2010 3:33pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics