Attention: This feature is in Early Adopter Product (EAP) release status. We will continue the development of additional features and
provide additional interfaces via patch updates and future releases. Please contact
Micro Focus SupportLine if you require further clarification.
Use the
dbfhadmin command-line tool to recover resources from region, cross-region, and datastore databases in the event of a system failure.
You can also use it to ensure that the database column used for primary and alternate indexed keys are set to the correct
SQL type.
Note: You must the command from an environment where the MFDBFH_CONFIG variable points to a configuration file that contains data
source entries for the databases to be administered.
Syntax:
dbfhadmin [action][options]
- Actions
- Refer to the running of the command as a whole:
- -casprocess - list or recover resources in CAS processes.
- -createdb - create a database.
- -keytypes - list, add, delete, import, or export key type metadata.
- -openfiles - list files or close open files in a datastore.
- -script - generate an SQL script for creating databases.
- Options
- Defines the options for the specified action. Valid values are:
- -add
- Specifies that keytype metadata is added or updated for a particular datastore. Use with the
-keytypes action.
- -collation:<id>
- The collation type used when creating a Db2 database. The default is SYSTEM_1252_US for Windows, and SYSTEM_923_US for UNIX/Linux.
Use with the
-script
-provider:db2 action/option.
- -datastore:<url>
- The URL of the datastore from which you want to list or recover files from. Use with the
-openfiles and the
-keytypes -import/-export action/options.
- -db:<dbname>
- Name of database to be created or used. Use with the
-script -provider:db2 action/option.
- -delete
- Specifies that keytype metadata is deleted for a particular datastore. Use with the
-keytypes action.
- -ebcdic
- Creates a database with EBCDIC support. Use with the
-createdb -provider:db2 action/option.
- -existdb:<db-name>
- Name of an existing database into which a datastore, region, or cross-region database is to be created. Use with the
-script -provider:db2 action/option.
- -export:<file-name>
- Specifies a file with which to export the keytype metadata for a particular datastore. Use with the
-keytypes -datastore action/option.
- -file:<url>
- Specifies the datastore data file that you want to add keytype metadata to, or remove keytype metadata from. Use with the
-keytypes -add/-delete action/options.
- -file:<file-name>
- Specifies the input file name for database creation, or the output file name for the generated script. Use with the
-createdb action for input files, and the
-script action for output files.
- -host:<name>
- The host name targeted for process recovery or forced file close. Use with the
-casprocess -list/-recover or
-openfiles -list/-recover actions/options.
- -import:<file-name>
- Specifies the file containing keytype metadata that is to be imported. Use with the
-keytypes -datastore action/option.
- The following example shows the required format for the import file, where
file1.dat, located at the root of the datastore, has an alphanumeric primary key and a signed COMP-X first alternate key;
file2.dat, located in the PAY1 sub-folder, has an alphanumeric primary key and first alternate key, and an unsigned COM-X second alternate
key:
<?xml version="1.0" encoding="us-ascii" standalone="no"?>
<keytypes_definitions>
<keytypes_definition filename="file1.dat" folder="/" types="AN,SCOMPX"/>
<keytypes_definition filename="file2.dat" folder="/PAY1" types="AN,AN,UCOMPX"/>
</keytypes_definitions>
- -list
- Lists the results of the specified action:
-casprocess -list shows the active processes,
-openfiles -list shows the files currently open.
- -name:<object-name>
- The name of the datastore or region database script to be created. Use with the
-script -type:datastore, and
-script -type:region actions/options.
- -nobanner
- Synonym for -quiet
- -password:<pwd>
- The password used to connect to a database. Use with the
-createdb -provider:az|pg|ss action/options.
- -pid:<process-id>
- The process ID applicable to the specified action. Use with the
-casprocess -recover or
-openfiles -recover actions/options.
- -provider:<db-type>
- The name of database provider for which the script is to be generated (-script), or database creation (-createdb).
<db-type> can be one of:
-
db-type
|
Description
|
db2
|
Db2
|
postgresql
|
PostgreSQL
|
pg
|
PostgreSQL
|
sqlserver
|
Microsoft SQL Server
|
ss
|
Microsoft SQL Server
|
- -recover
- Recovers the resources owned by a CAS process, or closes an open datastore file. Use with the
-casprocess or
-openfiles actions/options.
- -replace
- Replaces keytype metadata that already exists for files. Use with the
-keytypes,
-add, or
-import actions/options.
- -type:<script-type>
- Specifies the type of database creation script, which can be one of: crossregion, datastore, or region. Use with the
-script and
-createdb actions.
- -types:<key-types>
- Defines the column types for a file's primary and alternate keys. Specify the key types as a comma-delimited list, using the
following types:
Type
|
Description
|
AN
|
Alphanumeric
|
BIN
|
Binary
|
SCOMPX
|
Signed COMP-X
|
UCOMPX
|
Unsigned COMP-X
|
- Use with the
-keytypes -add/-replace/-import/-export/-list action/options.
- -usedb:<instance>
- Use the specified database server instance. Use with the
-casprocess -list/-recover,
-createdb -provider:az|ss, or
-openfiles -list/-recover actions/options.
- -user:<user-name>
- The user name used to connect to a database. Use with the
-createdb -provider:az|pg|ss action/options.
- -verbose
- Displays additional information, such as the
MFDBFH.cfg configuration file and script folder locations in effect, for the current operation.