|
|
Managing a Database Server
This chapter contains a short guide to administrating database servers under OpenVMS. It also describes how to use the MIMCONTROL command under OpenVMS.
For general information on managing database servers, refer to the Mimer SQL System Management Handbook.
The MIMCONTROL Command
Before you can access a database, the Mimer SQL database server must be started on the node it resides on.
You start, stop and control database servers on OpenVMS using the MIMCONTROL command.
Note: You cannot start the MIMCONTROL program by using the DCL command RUN.
Required Privileges
To use MIMCONTROL you must have either:
- CMKRNL, CMEXEC, SHMEM, SYSPRV, WORLD, TMPMBX, OPER, NETMBX, PSWAPM, DETACH, ALTPRI, PRMGBL, SYSGBL, SYSLCK and SYSNAM privileges.
Database Server Parameters - the MULTIDEFS File
When you start a database server on an OpenVMS machine for the first time, MIMCONTROL will create a MULTIDEFS file containing default parameter values for the database server. These parameters are based on the amount of memory installed on the machine.
You may also generate the MULTIDEFS file manually by using the MIMCONTROL/GENERATE command. For example:
$ MIMCONTROL/GENERATE my_databaseIt is not possible to change the parameters for a running database server.
You can fine-tune database server performance by adjusting the parameters as required.
Refer to the Mimer SQL System Management Handbook for details.
MIMCONTROL Syntax
You run the MIMCONTROL program is using arguments specified on the command-line.
$ MIMCONTROL/START my_databaseStarts the database server and provides access to my_database.
If you run the MIMCONTROL command without any options it displays help on command-line arguments.
MIMCONTROL Command-line Arguments
For more information on MIMCONTROL arguments and their combinations, see the Mimer SQL System Management Handbook.
/STATUS/DCL Output status information about the specified database server into the symbol MIMER_STATUS for use in a command procedure.
For details about the output string resulting from this option, see MIMCONTROL (/STATUS/DCL). /STATUS Output status information about the specified database server. /DISABLE Disable new user connections to the database server. Users already connected are not affected. /ENABLE Enable new user connections to the database server. /KILL Kill the database server immediately. This should only be used in emergency situations when a normal stop 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. /LOGOUT=chan Force logout of the specified channel number.
Use channel numbers displayed by the USERS option of the MIMINFO command, see the Mimer SQL System Management Guide. /START [=timeout] Start the database server.
If the server does not become operational within the specified number of seconds, the server will be killed.
The default timeout is 600 seconds. /STOP [=timeout] Stop a database server. Any remaining users will be logged out.
If the database server does not stop within the specified number of seconds, the server will be killed.
The default timeout is 120 seconds. /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. /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 MIMINFO, see the Mimer SQL System Management Guide. /GENERATE Create a new MULTIDEFS.DAT file with default for parameters, if the file is missing. 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 setting the MIMER_DATABASE logical name.
The DEFAULT setting in SQLHOSTS is not used for MIMCONTROL.MIMCONTROL (/STATUS/DCL)
The MIMCONTROL/STATUS/DCL command is a special form of the 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 command procedures.
On OpenVMS, the MIMCONTROL command is silent and sets the DCL symbol MIMER_STATUS to the value of the status string.
You can use the lexical function F$ELEMENT() to extract the list elements. For example:
$ MIMCONTROL/STATUS/DCL $ SHOW SYMBOL MIMER_STATUS MIMER_STATUS == "Running,Enabled,LOKE_0:[PER.LOKE824],0,A2,2001-07-04 16:10" $ DIR=F$ELEMENT(2,",",MIMER_STATUS) $ USERS=F$ELEMENT(3,",",MIMER_STATUS) $ PID=F$ELEMENT(4,",",MIMER_STATUS) $ SHOW SYMBOL DIR DIR = "LOKE_0:[PER.LOKE824]" $ SHOW SYMBOL USERS USERS = "0" $ SHOW SYMBOL PID PID = "A2"
|
Upright Database Technology AB Voice: +46 18 780 92 00 Fax: +46 18 780 92 40 dbtechnology@upright.se |
|
|