Database integrity checks

by ChessBase
6/16/2009 – Sometimes bad things happen and your chess data gets corrupted. In the last ChessBase Workshop we looked at ways to back up a database. This time we show you how to use a ChessBase 10 tool which can help you retrieve data you might have thought was lost; it's all described in the latest ChessBase Workshop.

ChessBase 17 - Mega package - Edition 2024 ChessBase 17 - Mega package - Edition 2024

It is the program of choice for anyone who loves the game and wants to know more about it. Start your personal success story with ChessBase and enjoy the game even more.


Bad things happen to good databases. We've been discussing this a lot in recent ChessBase Workshops and I won't reiterate the various scenarios which can occur to damage your databases. When that happens, though, there is a ray of hope: ChessBase 10 can check the integrity of a database and attempt to repair any damage which it finds.

In the last ChessBase Workshop column, we looked at ways to back up a database. My ulterior motive for presenting that information first was this: before running any function which can cause sweeping changes to a database (such as integrity checks/damage repairs, or eliminating duplicate games) it's always a good idea to back the database up first in case you don't like the changes the process caused. It's that "ounce of prevention/pound of cure" cliché in action; making a backup copy ensures that you're not stuck with (or by) the result of an important alteration to your database files.

That having been said, let's get to work and see how to check the integrity of a ChessBase database. There are a few ways to start this process; one is to single-click on a database to highlight it, go to the "Tools" menu, select "Database", and then "Check integrity" from the submenu. You'll see a popup appear:


This dialogue allows you to "bundle" together the data integrity check and the repair process in a single step. It's your choice; for this example we'll click "Yes". Then we see the following:


Told ya so. (I'll resist the temptation to add a "Nyahhh!" and we'll just move on.) We'll click "Yes" and see what comes next:


Just leave the default at "1" and click "Yes", unless you can think of a good reason to change it to a different value (and I'll confess that I can't come up with a single danged one). Click "Yes" and the process will begin -- a series of progress boxes will appear, after which you'l have the final result:


"Copy" sends this text report to the Windows Clipboard, so you can paste it into another document if you choose. "Close" just closes the informational display.

This is an interesting result for me -- as small as this database was (fewer than fifty games), it still contained two errors. But I never had a problem opening the database or any of the games within it. That's the reason why we make a backup of a database before running this function! Although there were definitely errors in the data of two games, they weren't serious enough to prevent me from viewing them (although they might have prevented me from adding information to them and then using "Replace game", for example). In this case, I'm likely to uncompress my backup copy (which I made in the course of writing last week's ChessBase Workshop) and overwrite the repaired files.

Sometimes, though, you get really serious problems -- a database's game list won't even open or many, many games show as "errors" in a database's game list. In these cases, ChessBase 10 will do what it can to repair the database. You won't always get all of the data back, but usually the database won't become a total loss. Note, though, that "Check integrity" isn't guaranteed to restore any data in cases where a database is just too far gone to repair it at all -- I've had databases of my own that became just too totally trashed to fix.

Note, too, that the process does take a little time. If a database contains hundreds of thousands, or millions, of games, it's the kind of function you start and then walk away from, returning later to see if ChessBase 10 has finished the process.

Until next week, have fun!

© 2008, Steven A. Lopez. All rights reserved.

Reports about chess: tournaments, championships, portraits, interviews, World Championships, product launches and more.


Rules for reader comments


Not registered yet? Register