mkdbase

Creates and/or configures a Reality database. There are four types of database you can create; see An Overview of Reality Administration for details.

Syntax

mkdbase {{options} database}

Comments

mkdbase provides both menu and command line interfaces, although the menu interface is available only when creating a new database.

Using mkdbase

Unless you use the -S option to specify a partition database on a single file system, the type of database created depends on the following:

Refer to Types of Database for information about these different database types.

A partition database can have up to 231 frames - with the default 1 Kbyte frame size, this gives a maximum size of 2 Terabytes (2048 Gbytes). The maximum size of a filestore database is determined by the size of the containing partition.

Unless you use the -l (lower case L) option, a newly created database is locked to all users except the database owner (the user who created it) and, on UNIX, the super-user. To allow general user access it is necessary to unlock it using either unlockdbase, or the ENABLE-LOGONS TCL command.

Unless you use the -N option, mkdbase prompts for a database name that must uniquely identify the database. This name is placed in a SYSMAN Master Dictionary item and is used by the WHO command and LOGON prompt in Reality. It also identifies the database in the ROUTE-FILE for external connections.

For partition databases, it is recommended that the file system where the database is created should have available free space about 10% of the size of the database. This is required for temporary files used during database operation.

Note

If necessary, the directory containing these temporary files can be moved to a different location by setting the TempDir database configuration parameter.

If you are using Database Isolation, you must use realroot to select the required instance of Reality before running mkdbase.

UNIX

On UNIX, Reality supports partition databases on a single file system, multiple file systems and multiple directly-accessed partitions. In the first two cases, the database parts are ordinary UNIX files.

If you try to create a multiple partition database that uses a partition that is already being used by Reality (for either another partition database or a filestore database), the system displays a warning message and a prompt asking if you wish to continue. If you enter Y, the partition is reformatted and all data in the existing database is lost. The messages are:

Overwrite existing database partition partition_name
Overwrite file system on partition_name

A filestore database may be located at any convenient point in the UNIX file system. A partition database may be located in one or more partitions or in files on one or more file systems. Normally a large filestore database will occupy a single partition. Smaller filestore databases may be created in any user's directory.

It is recommended that a user-id is reserved for creating the database and different user-ids are used to access the database. Normally each user should have a unique UNIX user-id. If users are allowed to logon to the database under the owner's id, database security mechanisms are made ineffective. Users are given database owner privileges so that they are able to update the config file, shut down the database, etc. The lockdbase command is also made ineffective unless the -a option is used with it.

Note

If you are using Database Isolation, mkdbase associates the new database with the currently selected instance of Reality.

Windows

On Windows, Reality supports partition databases on both a single file system and multiple file systems. In both cases, the database parts are ordinary Windows files.

A database can be created at any point in an NTFS file system.

On Windows 7 and Server 2008, databases that will be available on the network must be created in a folder with unrestricted access, such as a dedicated subfolder within the root folder. A database in a user's home folder cannot be accessed remotely.

Build Sequence

The database is built in the following sequence.

  1. A skeleton database with the specified name is created.

  2. Unless disabled, the SYS-LOAD Proc is run. This:

    1. Loads standard system files and programs into the skeleton database.

    2. Catalogs all DataBasic programs to make them available to all users.

    3. Sets the default operating environment as appropriate for the specified MultiValue emulation.

See Also

mkdbase Menu Interface, mkdbase Command Line Interface, realfstab file.