APPX Software Library

Appendix A: Server Utility Reference

mdcreate

Creates a data dictionary that stores metadata (details on the structure of SQL tables and indexes).

Syntax

mdcreate [ -v ] [ -d directory_spec ] dbname

Arguments

-v

Specifies verbose mode, so mdcreate generates detailed status messages.

-d directory_spec

Specifies an alternative directory specification in which to create the data dictionary. This argument is valid only for the Desktop configuration.

The mdcreate utility creates a subdirectory to contain the data dictionary files. It uses the name specified in the dbname argument for the subdirectory. There are three levels of defaults that determine where mdcreate creates this subdirectory:

  • The directory specified by the -d argument
  • If the mdcreate does not specify -d, the directory specified by the TPE_DATADIR environment variable
  • If TPE_DATADIR is not set, mdcreate creates the dbname subdirectory under the directory specified by the TPEROOT directory.

For example:

$ C:\dharma\bin\mdcreate -d E:\databases demo_db

This command creates a subdirectory called demo_db.dbs under the E:\databases directory and populates the directory with the necessary files.

Once you create the database subdirectory in this manner, you must explicitly specify its location in mdsql command lines and when you add ODBC data source names:

  • In mdsql, use the -d option to specify the same directory path as you used for mdcreate. For example:
$ mdsql -s C:\dharma\odbcsdk\sample\md_template -d E:\databases
demo_db
  • In the Microsoft ODBC Administrator utility, the ODBC Setup dialog box contains a Data Dir text-box field. Use it to specify the same directory path as you used for mdcreate.
dbname

The name of the database. ODBC applications and the mdsql utility specify dbname to access the database.