(Also See: Database Backup And Recovery) (Also See: Tip: Keeping Your Database Size Minimal)
Database Maintenance includes three internal maintenance procedures (that are not listed elsewhere) followed by the Database Verify step. The Database Verify is essentially the last step of the Database Maintenance. Database Maintenance is performed automatically by IRT at startup if the software was not shut down properly, e.g. power failure or end-task (force quit). There is usually no need to run this manually, but if Database Verify reports errors, it is a good idea to run Database Maintenance from the Control menu since it can correct minor database errors thereby avoiding the need to restore a database to the most recent backup.
In our next release we will be adding the option of performing the two compress database functions prior to Backup Database. We recommend that the Database Verify be performed before all backups. Set these options in Setup: Preferences: Backup. Compression is not strictly necessary. These utilities simply compact the historical data to keep the size of the data files at a minimum.
The Verify Historical Data is a utility function that fixes out of time-sequence historical data. It's a good idea to run this every day after the close or before the open or just once a week, but it's not strictly required. You can schedule this utility to run daily or once a week using a schedule. See Setup: Schedules.
There are two "historical database" files managed by IRT, the Daily/Weekly/Monthly database file (hist.d01) and the intraday historical database file (tick.d01). The Initialize Historical Database command initializes (empties) them both, i.e. it performs an Initialize D/W/M Database and an Initialize Intraday Database. Sometimes a database can become "damaged" in a limited way, e.g. an error or errors in the intraday database, or in the daily/weekly/monthly database. The initialize command will clear away all historical data on file, wipe the slate clean so to speak, thereby correcting the database errors so that the database will now verify successfully. Of course, all historical data must be reacquired if you do this, but the benefit is that the rest of the database with all of your instrument setups, charts, quote pages, scans, signals, trading systems, etc. remains intact. There have been instances when an IRT user discovered a damaged database and had no valid backup. In such a situation, if the errors are limited to the historical section of the database as they often are, the initialization utilities can reestablish database integrity while retaining everything except the historical data which can be reacquired via downloading.
The Restore Database command is there as a last resort. If there are errors in the database first try to eliminate them by running the Database Maintenance. If errors persist, then typically a Database Restore is required to regain database integrity. After using the Restore Database command we recommend performing a Database Verify immediately just to be sure the database is now okay. If so, quitting IRT and starting up again is recommended but not strictly required. As described above, if database errors persist even after a restore (an event that theoretically should never happen), the initialization utilities may enable you to recover integrity. Of course, it's always a good idea to have at least two verified database backups, at the very least a weekly or monthly CD-Rom or zip disk backup to return to as a last resort in case the database becomes damaged beyond repair.
For more information on this subject, read the built-in help topic titled "Database Backup and Recovery".