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.
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 TESTDB
It 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.
You run the MIMCONTROL program is using arguments specified on the command-line.
For example:$ MIMCONTROL/START TESTDB
Starts the database server and provides access to TESTDB.
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.
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). Output status information about the specified database server. Disable new user connections to the database server. Users already connected are not affected. Enable new user connections to the database server. 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. 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 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 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 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. 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. Create a new MULTIDEFS.DAT file with default for parameters, if the file is missing. 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.
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.LOKE],0,A2,2003-11-16 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.LOKE]" $ SHOW SYMBOL USERS USERS = "0" $ SHOW SYMBOL PID PID = "A2"
The MIMTCP Server
If you are using the TCP/IP protocol, a MIMTCP server listening to a specific port (usually port 1360) will be started the first time the database server is started.
TCP/IP Port Number
The TCP/IP port number that the MIMTCP server will listen to is specified in the TCPPort parameter in the MULTIDEFS.DAT file. If several database servers specify the same port number, they will share the same MIMTCP server.
When a client connects to the TCP/IP port, the MIMTCP server will accept the connection. The client specifies the database to which a connection is to be established and the MIMTCP server will hand over the connection to the appropriate database server. All further communication between the client and the database server is then done directly without involving the MIMTCP server.
System Logical Names
Whenever a MIMTCP server starts, it will define the system logical name "MIMTCP_xxxx" (where xxxx is the port number) to be the PID of the MIMTCP server process. This makes it easy to find the MIMTCP server process that is listening to a particular TCP/IP port.
Controlling MIMTCP servers
The command procedure MIMEXE9:TCPCONTROL.COM can be used to manage MIMTCP processes. The first parameter given to the procedure controls what the procedure should do. If no parameter is given, a short help message is displayed. The following example shows how the MIMTCP server for port 1360 is stopped and a new server for port 1337 is started:$ @mimexe9:tcpcontrol Usage: TCPCONTROL STATUS ! Display status for all MIMTCP processes TCPCONTROL START [port] ! Start MIMTCP process for a port TCPCONTROL STOP [port] ! Stop the MIMTCP process for a port TCPCONTROL STOP ALL ! Stop all running MIMTCP processes $ @mimexe9:tcpcontrol status Pid Port Version Username Started 00000227 1360 937E SYSTEM 25-OCT-2003 22:14:29.22 $ @mimexe9:tcpcontrol stop 1360 MIMTCP process for port 1360 STOPPED $ @mimexe9:tcpcontrol start 1337 Starting MIMTCP process version 937E %RUN-S-PROC_ID, identification of created process is 00004D04 $ @mimexe9:tcpcontrol status Pid Port Version Username Started 00004D04 1337 937E SYSTEM 18-NOV-2003 12:09:11.96
Starting and stopping MIMTCP servers explicitly using the TCPCONTROL procedure is rarely needed. When the MIMCONTROL/START command is used, a MIMTCP process will be started automatically. This process will normally be active until the machine is shut down. Since the MIMTCP process does not hold any resources, it is not necessary to shut it down explicitly in the machine shutdown procedure.
In order to successfully start a database server, the following conditions must be fulfilled:
- The system databank file, SYSDB93.dbf, must have been created. See Generating System Databanks and SYSADM
- There must be an entry for the database in the local section of the SQLHOSTS file. See Editing the SQLHOSTS File
- The ProcName of the MULTIDEFS file must not specify a process name prefix that is identical to that of another running multi-user system.
- The MIMSETUP9 command procedure must have defined the logical names to be SYSTEM-wide or GROUP-wide.
- There must not be any logical names in the JOB or PROCESS tables that override the SYSTEM or GROUP definitions.
- The shareable image in the file named MIMLIB9:MIMDBP9.EXE must be properly installed.
- There must not be any other node in a cluster which has started the same database server.
- The database must not be in use in single-user access mode at the time the database server is started.
- The file SYS$MANAGER:MIMERKEY.DAT must contain a valid Mimer SQL license key.
Mimer Information Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40