|
|
Controlling the Database Server - MIMCONTROL
MIMCONTROL functionality is supplied on all platforms as a complete administration tool for managing database servers.
UNIX: The database servers on a UNIX node can be controlled using the mimadmin command (see the mimadmin man-page). This command invokes the MIMCONTROL program, and other programs, as required. The MIMCONTROL command can also be used directly under UNIX.
A database server on UNIX can be administered by the owner of it or by the superuser root. To change ownership of a database the mimdbfiles command is used (see the mimdbfiles man-page).
When a database server on a UNIX machine is started for the first time, MIMCONTROL will create a default multidefs file containing appropriate default parameter values, based on the amount of memory installed on the machine. Refer to The MULTIDEFS Parameter File for details.
VMS: The database servers for the local databases on an OpenVMS node are controlled by using the MIMCONTROL command directly (as described in this section).
When a database server on an OpenVMS machine is started for the first time, MIMCONTROL will create a default MULTIDEFS file containing appropriate default parameter values, based on the amount of memory installed on the machine. Refer to The MULTIDEFS Parameter File for details.
MIMCONTROL Syntax
MIMCONTROL is controlled by flagged information specified on the command-line.
The overall syntax for MIMCONTROL (expressed in UNIX-style) is:
mimcontrol [-bcdekstwA] [-l chan] [database]If MIMCONTROL is invoked without any options, it displays help options on the command-line.
MIMCONTROL Command-line Arguments
UNIX-style
VMS-style
Function
-b /STATUS/DCL Output status information about the specified database server as a single-line list suitable for use in a script.For details about the output string resulting from this option, see MIMCONTROL (/STATUS/DCL or -b). -c /STATUS Output status information about the specified database server. -d /DISABLE Disable new user connections to the database server. Users already connected are not affected. -e /ENABLE Enable new user connections to the database server. -k /KILL Kill the database server immediately. This should only be used in emergency situations when a normal stop using the -t option does not work.The next time the database is started, all databanks that were open at the time the server was killed will be automatically checked. Connected users will receive an error the next time they attempt to access the database. -l chan /LOGOUT=chan Force logout of the specified channel number. -s [timeout] /START [timeout] Start the database server.If the server does not become operational within the specified number of seconds, the server will be killed.Default timeout is 600 seconds. -t [timeout] /STOP [timeout] Stop a database server. Any remaining users will be logged out.If the server does not stop within the specified number of seconds, the server will be killed.The default timeout is 120 seconds. This option can be combined with the
-d and -w options, see MIMCONTROL Examples. -w [timeout] /WAIT [timeout] Wait for all connected users to log out.If there are still users connected after the timeout period expires, the command fails.The timeout period should be given in seconds. If no timeout period is specified wait will be performed without any timeout. -A /DUMP Create a dump directory and produce dumps of all internal database server areas to files in that directory.The files produced can be examined by using the MIMINFO -f command, see System Information - MIMINFO. database database Specifies the name of the database to access.If a database name is not specified, the default database will be controlled.The default database is determined by the setting of the MIMER_DATABASE environment variable.The DEFAULT setting in SQLHOSTS is not used for MIMCONTROL.
MIMCONTROL (/STATUS/DCL or -b)
The mimcontrol -b (MIMCONTROL/STATUS/DCL) command is a special form of the mimcontrol -c (MIMCONTROL/STATUS) command which returns the database server status information in the form of a single string containing a comma-separated list which is useful when writing scripts.
Status String Components
The status string has the following components:
server-state,logins,db-directory,connections,server-pid,start-dateEach component is described below:
Note: If the database server is not operational, the status string will contain only the first three fields.
MIMCONTROL Examples
The parameter options can be combined in the following ways, examples are given in both OpenVMS-style and UNIX-style:
MIMCONTROL/START/DISABLE db_server_name mimcontrol -sd db_server_nameMIMCONTROL/START/STATUS db_server_name mimcontrol -sc db_server_nameMIMCONTROL/DISABLE/WAIT=180 db_server_name mimcontrol -dw 180 db_server_nameThe exit code from the MIMCONTROL command is success if all users logged out within the three minute timeout period.
If the timeout period expires and there are still users logged in on the system, the MIMCONTROL command will exit with a warning status code.
MIMCONTROL/WAIT/STOP db_server_name mimcontrol -wt db_server_nameWhen all users are logged out, the system will be stopped. If the wait timeout period expires, the MIMCONTROL command will exit with a warning status code without stopping the system.
- The following command is similar to the previous one, but will ensure that no new users log in to the system while waiting for all users to log out:
MIMCONTROL/DISABLE/WAIT/STOP db_server_name mimcontrol -dwt db_server_nameMIMCONTROL Exit Codes
MIMCONTROL returns a status code to the environment executing the command. The status code can be examined by scripts.
The following return codes are used:
|
Upright Database Technology AB Voice: +46 18 780 92 00 Fax: +46 18 780 92 40 dbtechnology@upright.se |
|
|