DBOPEN - Databank Open

The DBOPEN program is used to make sure that the users can open all databanks quickly.

It can take relatively longer to open a databank if it is a large databank that was closed abnormally (for example if the machine crashed,) because a databank check is automatically initiated following such a situation.

DBOPEN - Databank Open functionality

Multi-user Mode

When DBOPEN is run in multi-user mode, the index pages of the databank are checked before databank access can proceed, but the bulk of the databank contents (contained in the data pages) is checked in the background, thus minimizing the delay.

Background Threads

The checking performed by DBOPEN is done by the background threads, see Number of Background Threads. Therefore, increasing the number of background threads will increase the efficiency of the checking.

DBOPEN should normally be run as soon as the database server has been started.

Syntax

The overall syntax for DBOPEN is:

dbopen [-s|-m] [-u user] [-p pass] database

 

dbopen [--single|--multi] [--username=user] [--password=pass] database

 

dbopen [-v|--version] | [-?|--help]

Command-line Arguments

 

Unix-style

VMS-style

Function

-m

--multi

/MULTI

Connects to the database in multi-user mode.

-p password

--password=password

/PASSWORD=password

Specifies the password used in connecting to Mimer.

If the switch is omitted the user is prompted for a password, unless OS_USER is specified with the username switch, as described above.

VMS:Note that in an Open VMS environment it might be necessary to enclose the password in quotation marks as the value otherwise is translated to upper case.

-s

--single

/SINGLE

Connects to the database in single-user mode.

-u username

--username=username

/USERNAME=username

Specifies the username used when connecting to Mimer.

To connect using OS_USER login, give -u "", --username="", or /USERNAME="".

database

database

Specifies the name of the database to access.

-?

--help

/HELP

Show help text.

If the optional database name is not specified, the default database will be accessed, see The Default Database.

If the username or password arguments are omitted, the program will prompt for these values.

If neither -s nor -m is specified for the optional mode flag, the way the database is accessed will be determined by the setting of the MIMER_MODE variable, see Specifying Single-user Mode Access, or, if this is not set, it will be accessed in multi-user mode.

 

 

.

Linux:The Unix-style command-line flags must be used on a Linux machine.

 

VMS:Either the Unix-style or the VMS-style command-line flags may be used on an OpenVMS machine - see the Mimer SQL VMS Guide for more details.

 

Win:The Unix-style command-line flags can be used from a Command Prompt window.

Exit Codes

The DBOPEN program returns an error status to the operating system when an error is encountered. This may be useful when running it from scripts or in batch mode.

Functions

The DBOPEN functionality opens all available databanks in a system.

As each databank is opened, the integrity is checked and any transactions that were interrupted by the abnormal close are completed. (The integrity check is always performed when opening a databank that has not been closed normally.)

The checks performed when an abnormally closed databank is opened may take some time, particularly if the databank is large. Running DBOPEN means that the checks are performed at a time determined by the system administrator, rather than a time determined by application programs. As a result, users will always have fast access to all databanks.

The databanks are opened in a randomly determined order. Running several DBOPEN sessions in parallel may speed up the checking process for the database as a whole.

Authorization

Any user who has SELECT access to the data dictionary table SYSTEM.DATABANKS can run DBOPEN.

Output Example

The following DBOPEN example shows the output from running dbopen after the system was shut down improperly:

dbopen -s -usysadm -p******

 

MIMER Databank Open Utility

Version 11.0.1A

 

2017-09-15 14:19:12.22   <Information>

MIMER/DB kernel error -16211 in function DKVED0

Databank SYSDB not properly closed, dbcheck initiated

 

2017-09-15 14:19:22.67   <Information>

MIMER/DB kernel error -16211 in function DKVED0

Databank TRANSDB not properly closed, dbcheck initiated

 

2017-09-15 14:19:22.71   <Information>

MIMER/DB kernel error -16211 in function DKVED0

Databank LOGDB not properly closed, dbcheck initiated

 

Opening databank APPDB1

 

All user databanks opened without errors