Appendix A: Server Utility Reference
mdsql
The primary use for mdsql is to load metadata into data dictionaries via an SQL script, which contains CREATE TABLE and INDEX statements with the STORAGE_ATTRIBUTES 'METADATA_ONLY' clause. This clause directs the SQL engine to insert metadata into the data dictionary without requiring the proprietary storage system to create an empty table or index. The table or index name used in the CREATE statement must be the same as an existing table or index in the proprietary storage system.
You can also use mdsql to create new tables or issue SQL queries interactively. Invoke it without the -s option and specify the database you want to access. Terminate statements with a semicolon. To exit from interactive mdsql, type CTRL/D.
Syntax
mdsql [-s script_file] [-u user_name] [-a password] [ -d directory_spec ] dbname
Arguments
-s script_fileThe name of an SQL script file mdsql executes.
-u user_nameThe user name to connect to the database specified. The default is the current user of the operating system. Unless you log in as dharma, you should specify
-u dharmaon the mdsql command line.-a passwordThe password to connect to the database specified. The default is null.
-d directory_specAn alternative location for the data dictionary directory. This argument is valid only for the Desktop configuration. If the mdcreate utility specified the -d argument, mdsql must specify the same argument (or the TPE_DATADIR environment variable should specify directory_spec).
dbnameThe name of the database, as specified to the mdcreate utility.