mkdbase Command Line Interface
The command line interface to mkdbase serves three purposes:
-
It allows you to create a database without displaying the menu interface. This allows you to use mkdbase in scripts.
-
If you include the -I (capital i) option, you can specify default values for use in the menu interface. For example, if you combine the -I and -N options, you will not be prompted for a database name:
mkdbase -IN mydb
-
It allows you to modify an existing database with -A, -a, -r and -R options; note that none of these can be combined with the -I option.
Parameters and Options
database The path (absolute or relative) to the database to be built or rebuilt, or the name of an entry in the realfstab file.
Note
The directory in which the database will be created must exist, but the subdirectory to contain the database must not. For example, if you specify /users/daveh/databases/mydbase
, the directory /users/daveh/databases must exist, but the subdirectory mydbase must not.
-A numfilesExtends a partition database on a single file system by numfiles files. The additional files will be the same size as the existing ones (see -S option).
-a Expands a partition database by linking additional partitions or files that have been added to the realfstab file.
-c Specifies that the database will support case-insensitive item-ids.
Note
You can specify that the default should be case-insensitive by setting the REALCASEINSENSITIVE host environment variable.
-F sizeSpecifies the size in kilobytes (1, 2, 4 or 8) of the Reality frames used within the database (default, 1Kbyte). Filestore databases can only use 1 Kilobyte frames; if you use both the
This option also changes the default frame size by setting the FrameSize parameter in the Reality master configuration file.
Note
-
It is recommended that, when migrating from another MultiValue system, you should, if possible, keep the same frame size as on the original database.
-
You can optimise your frame size by using the procedure described in File Structure.
-
The minimum database size is 20000 frames. If you increase the frame size, check that your database is large enough to exceed this minimum.
-h hashTypeSets the hash type for the database. hashType must be one of the following values:
1 Use a hashing algorithm that is compatible with earlier versions of Reality (earlier than V8.1) and other MultiValue systems.
2 Use a hashing algorithm that can better handle item IDs longer than 28 characters.
The default, if the -h option is omitted, is hash type 2.
This option also sets the HashType database configuration parameter.
-I (capital i) Displays the mkdbase menu. Any other command line options used specify default values for the parameters concerned.
-i Completely remove the data from the database. Use when creating or rebuilding a partition database (without this option, only the minimum necessary initialisation is performed). Cannot be used with filestore databases.
-k Kill database daemon (UNIX) or server (Windows). This forces all users to log off, so that the database can be rebuilt.
-l (lower case L) Unlock the database on completion. The default is to leave the database locked to all users except the owner (the user who created it) and, on UNIX, the super-user.
-M modCreate the SYSTEM file with modulo (number of groups) mod (default is 11). Use with the
-m mdbaseName of database mounting an image save. Example of usage:
mkdbase -N<image name>-m<master dbase name>-T<tape path list>
-N nameUse name as database name. If this option is not used, mkdbase prompts for a name.
Note
If you specify the database name using the -N option, you can omit the database parameter. The database will be created in the current directory, in a subdirectory with the same name as the database.
-n UNIX only. Assumes the answer to any confirmation prompt is "no". This prevents any unmounted file system on the partition being overwritten.
-P filesize{xnumfiles}
Specifies a partition database on a single file system, where numfiles is the number of host files (default, 1) and filesize is the size of each of these files in frames. The total size of the database will be filesize ยด numfiles. If numfiles is omitted, the database will consist of a single host file.
This option is deprecated - the -S option is preferred when specifying the size of a partition database on a single file system.
-p Do not run the SYS-LOAD Proc in the new or rebuilt database. This can speed up database creation, but you should only use it if instructed by your NEC Software Solutions representative.
-r Clears and rebuilds an existing database. This option prompts to confirm that you wish to rebuild the database. It can be used in conjunction with the -u option to change the access permissions on the rebuilt database.
Caution
The -r option destroys all data in the existing database. All files except those in the configs directory and top database directory are removed and re-initialised.
The -r option can be used to resize system files on the database. Refer to the topic Resizing System Files.
You can combine the -r and -F options to change the frame size of an existing database.
-R Windows only. Allows you to do the following:
-
Register an unregistered database. For example, if you copy a database from another Windows host, it must be registered before you can use it.
-
Correct the access permissions for a database. You may need to do this if you cannot connect to the database via telnet.
-
Rename a database (use in combination with the -N option - the database in the folder you have specified will be be given the name specified with -N).
This option does not modify the data in the database.
-S size[M||G]{ numfiles}
Specifies a partition database on a single file system, where size is the total size in Megabytes (M) or Gigabytes (G) and numfiles is the number of host files used. If numfiles is omitted, the database will be divided between ten host files.
Note
-
If you omit the -S option and there is no entry for the database in the realfstab file, a 20Mbyte database will be created, consisting of a single host file.
-
The minimum database size is 20000 frames. If you increase the frame size, check that the size you specify is large enough to exceed this minimum.
-s sizeStripe size, in frames, for partition database. The default, if the -s option is omitted, is 16. To turn striping off, set size to 0. Does not apply to a partition database on a single file system (the host filing system/storage hardware performs any striping required).
Caution
Do not use striping on both Reality and the host.
-T tape_listList of tape devices to mount. For an example of usage, see -m above.
-U UNIX only. Creates a filestore database.
-u User (owner) only access.
-v Verbose mode.
-y Use with the -r option to suppress the confirmation prompt.