hsqldb version 1.7.0 Database Files and Recovery

The Standalone and Client/Server modes will in most cases use files to store all data to disk in a persistent and safe way. This document describes the meaning of the files and the mechanisms.

A database named 'test' is used in this description. The database files will be 'test.script', 'test.properties', 'test.data' and 'test.backup'.

Database Files

Mechanisms

Database is opened

Database is aborted

This may happen by sudden power off, Ctrl+C in Windows, but may be simulated using the command SHUTDOWN IMMEDIATELY.

Database is closed correctly

This may be done using the command SHUTDOWN, in the Standalone version using Connection.close()

Repair

The current test.data file is corrupt, but with the old test.data (from the test.backup file) and the current test.script, the database can be made up-to-date: