Crash recovery
A crash happens when the database is left in an inconsistent state, either by power or hardware failure, or other reasons. The recovery process, hence called crash recovery, will attempt to bring back the database to a consistent state.
The process is automatic when the database is started, but we do need to make sure that the database is recovered correctly, otherwise we may have to initiate other recovery procedures.
In this case, we deliberately provoke a crash in order to examine crash recovery. We encourage you to have a sandbox environment and test various scenarios.
Getting ready
You may want to try this on a test machine. Use a database for which you already made a backup, just in case. We will launch a transaction that will hopefully be long enough to allow us to shut the power and see the crash recovery results.
How to do it...
Start the database manager:
[db2inst1@nodedb21 ~]$ db2start SQL1063N DB2START processing was successful.
Connect to a database:
[db2inst1@nodedb21...