Database Management and Recovery

Use the dbfhadmin command-line tool to recover resources from datastore databases in the event of a system failure.

If an enterprise server process terminates abnormally, database resources used by the process (for example, open file handles) may not get freed up correctly.

For database-hosted data files, use the -list action to display any data files still open. After ensuring that the host machine or (if specifying a process id) the process is no longer running, use the -recover option on any files that are still open. When files are forced closed, their file handles are removed from the datastore database and any associated record locks released.

You can also use the dbfhadmin command-line tool to manage the column types that correspond to the primary and alternate keys of your indexed files. The -keytypes action of dbfhadmin enables you to inject different key types for a file's indexed keys. You will also need to use dbfhadmin to define key type definition if your indexed files were created via COBOL programs that were not compiled with the IXNUMKEY Compiler directive.
Upgrading datastores: Periodically, MFDBFH may need to upgrade an existing datastore to fix a problem, or provide the necessary support for new functionality. In most circumstances, the upgrade occurs automatically when a new version of MFDBFH detects that the datastore that it is running with does not support the latest level of functionality. However, it is possible that the upgrade process may fail if the currently connected user does not have sufficient database privileges to perform the operation. When this happens, MFDBFH outputs the following message to the console, indicating that a manual upgrade is required:

DBFH00034S MFDBFH failed to upgrade the datastore. Manual upgrade required. Use 'dbfhadmin -upgrade -datastore <datastore-url>' to generate an upgrade script and run the script as a user with sysadmin privileges