Imagine the scene – a broken database on an unsupported version of DB2, with no backups or log files to recover the database.
Yes – this one really was the stuff of nightmares!
Apidays New York 2024 - The value of a flexible API Management solution for O...
Top 10 DB2 Support Nightmares #7
1. Top 10 DB2 SupportTop 10 DB2 SupportTop 10 DB2 SupportTop 10 DB2 Support
Nightmares & How toNightmares & How toNightmares & How toNightmares & How to
Avoid ThemAvoid ThemAvoid ThemAvoid Them
#7#7#7#7
2. Part 7 – As bad as it gets!
Image of a junior DBA
Imagine the scene – a broken database on an
unsupported version of DB2, with no backups
or log files to recover the database.
Yes – this one really was the stuff of
nightmares!
3. How did it happen?
An erroneous script had deleted a few
transaction log files that had a ‘last change
date’ of more than 45 days.’
A database restart was required but the
database did not start.
The database was looking for an old log file
which had just been deleted by the script.
The log file had also been deleted from the
archive logs.
4. Image of a junior DBA
The database had a number of web facing apps
relying on it for important features.
The version of DB2 in use had passed it’s “End
of Service” date.
END OF SERVICE
8. • Ran db2dart on the database to check for any errors, got the Tablespaceid, Tableid and
total number of pages allocated to each table.
• Built db2dart command with the DDEL option to extract the data in delimited format.
• The extract could not be scripted so this was done manually for 300+ tables!
• Created a new database
• Loaded the extracted data to the new database, ran runstats on the table and indexes
15 hours of db2dart, import/load, runstats and data fixes later the database
was available for the application!
Here’s what we did…..
9. The database was down for a total of 20 hours but was
brought back in one piece with almost no data loss!
How long?
10. Have a scheduled clean-up procedure for the archive log directory.
If possible, keep at least one backup image on disk.
Be aware of advanced recovery tools such as db2dart - they can be lifesavers
in extreme situations.
Make sure you know who to call if disaster strikes!
The moral of the story