602SQL Documentation Index  

Patching of a seriously damaged database

You can retrieve data from a database even when you can't run a server with the database file.

The state of database that is suitable for patching is signified with messages such as Poškozen databázový soubor or even Chybná verze serveru, or some granted privileges get lost and a user can't connect to the database. Such a situation may occur when some program overwrites some part of the database file.

There may however be left some undamaged parts of the database. Database patching allows you to try to get the database to a state so you can connect to the server, export what is left of the data and move them to a new database.

It's not recommended to use patching when you can connect to the server but have some data missing or damaged. Patching won't help in this case. Patching can't be applied to a encrypted database file.

Database patching

Database patching can be executed from the Control Panel. Select the appropriate server, don't connect to it. The Database management action opens a dialog, browse to the Management tab and press the Patch! button. After two serious warnings the action gets underway.

Database renovation

After successful database patching, run the 602SQL developer interface with the /B switch (change the command line for the shortcut). This switch prevents eventual program compilation in the internal language when opening an application and thus also writing to a drive.

Export object definitions and table data to files further on. It's recommended to export the data in the internal format. It's safer to export the individual components of each application rather then the application as a whole, because one damaged component prevents export of other components.

Don't try to write any data to the patched database!

After exporting all that can be saved create the database from the scratch.

If the 602SQL programs are undamaged, you're not required to reinstall them, it's sufficient to create new database with the Create a new local sever action from the Control panel.

The newly created database is empty and you can import data you saved from the damaged database.