The Mimer SQL software installation on Linux is expected to be completed in less than a minute, and creating the initial data dictionary and starting the database server will only take just a little longer.
Download a suitable distribution package from https://developer.mimer.com/downloads and follow the instructions given below. Download packages are available as a complete distribution and as a headless server distribution package, without desktop integration etc. Distribution packages are provided in DEB, RPM and TAR formats, respectively.
To get up-and-running with Mimer SQL is usually made in a minute or two. Here is a quick step-by-step instruction using a sample Debian Linux 64-bit distribution package. The details will be given in the following sections.
Download a Debian Mimer SQL for Linux (64-bit) from https://developer.mimer.com/products/downloads/.
2Install the package.
Install Mimer SQL, in this case using the Debian package:
# sudo dpkg -i mimersql1100_11.0.0A-24298_amd64.deb
3Create a database.
Create the initial Mimer SQL database named testdb, including an example environment:
# dbinstall -e testdb xpass
The system administrator (SYSADM user) password will be asked for.
4Control the database.
Verify the database server status by using the Mimer SQL administration tool, which can be used to control the database:
# mimadmin testdb
5Access the database.
Access the database and the example environment as follows, using the ident MIMER_STORE with password ‘GoodiesRUs’:
# bsql testdb
Mimer SQL Command Line Utility Version 11.0.6C Beta Test
Copyright (C) Mimer Information Technology AB. All rights reserved.
SQL>select * from categories;
3 rows found
To provide for a complete and proper easy-to-use installation, the procedure when installing Mimer SQL is doing all needed installation actions automatically. This includes updates to operating system locations, such as /usr/bin, /usr/lib and /etc. For example, the following tasks are handled:
•TCP/IP settings for Mimer SQL client/server access (/etc/inetd.d, /etc/xinetd.d and/or /etc/systemd/system)
•autostart settings for Mimer SQL databases (/etc/init.d)
•desktop menu items (/etc/xdg, /usr/share)
•system wide Mimer SQL database catalog (/etc/sqlhosts)
•system wide ODBC data source catalog (typically /etc/odbc.ini and /etc/odbcinst.ini)
•system wide Mimer SQL man-page setup (/usr/man, or /usr/share/man)
•easy access for Mimer SQL programs and libraries (/usr/bin and /usr/lib)
To achieve this, the installation requires sudo access, or it has to be executed as root.
When using the DEB package, a package manager environment that can cope with DEB-files must be installed. Installation using the DEB package means that a predefined installation is made to a default setup.
The TAR installation procedure allows for a more flexible installation, but other hand, it requires some answers to questions and knowledge of operating system setup. The questions are given with explanations to each installation step and with default options.
The Linux operating system version and kernel version required, along with the target hardware for an installation package, is usually connected to a specific distribution package and information is provided on the Download page of the Mimer SQL Developer site, https://developer.mimer.com/products/downloads/.
The amount of physical memory used by the database server process is determined by parameters in the local database definition, whose initial default values are determined by looking at the amount of installed memory.
The amount of virtual memory that the database server process can use is limited by the operating system. The virtual memory handling on Linux is platform specific - refer to the documentation for the specific Linux operating system you are using. (Often a paging file used).
The Mimer SQL for Linux distribution is available in two different packages; as a complete installation, and also as a so called headless package, especially suitable for dedicated server machines and docker/embedded environments. The headless package is solely command line based and does not include any desktop related parts (such as the DbVisualizer database access tool), or any documentation but the Release Notes.
The complete Mimer SQL distribution contains the following:
•Tools, libraries, examples, man-pages, etc.
•A complete documentation set in PDF format.
•An ODBC Driver, available in the libmimodbc shared library - see the chapter Mimer SQL and the ODBC API, in Programmer’s Manual. This driver can be used for direct access to a Mimer SQL database, or it can be used with a third party ODBC Driver Manager, for example unixODBC, or iODBC.
•A JDBC Driver, type-4, written in 100% Java - see the chapter Mimer SQL and the JDBC API, in Programmer’s Manual.
•Various other database API’s, like Embedded SQL, Module SQL and a native Mimer C API.
The default installation location is /opt, where a sub directory named according to the package is created. For example, if Mimer SQL 11.0.0A is installed, an installation path like /opt/mimersql1100-11.0.0A is used. This Mimer SQL main installation directory then contains the following sub directories:
•bin - contains Mimer SQL tools, and other executable files.
•DbVisualizer - contains all resources for the DbVisualizer tool that is bundled with Mimer SQL. Please note that an even more powerful version, DbVisualizer Pro, can be purchased from https://www.dbvis.com/. The DbVisualizer Pro features are enabled by installing a license key file.
•doc - contains Mimer SQL documentation.
•examples - contains example files.
•include - contains various header files that may be needed when developing with Mimer SQL.
•lib - contains library files.
•lib32 - contains 32-bit libraries for execution of 32-bit applications. (Only available in installation packages for 64-bit platforms).
•man - contains Mimer SQL man pages.
•misc - contains various additional files, like desktop menu system resources.
Additional Python interface
python -m pip install mimerpy
For Linux platforms the software package is currently available in three different shapes:
This installation type needs the RPM package manager environment to be installed. An advantage is that possible dependencies to other software automatically are verified and arranged for.
This installation type needs a Debian package manager to be installed. In the example below the dpkg command will be used. Dependencies will be verified during this installation.
This installation type is platform independent and is the one that can be used for all UNIX/Linux platforms. If a customized installation is desired, for example if the software should be located in a non-default location, the TAR installation may be handy. On the other hand, a TAR installation is not integrated in commonly used package managers and must therefore be managed manually. Using the TAR installation method will NOT ensure that needed parts among other operating system packages are up to date.
When using RPM, installed files are fully maintained by the RPM package manager. RPM will keep track of all files installed by RPM, and it will also check that all dependencies to system libraries are available and up-to-date.
To get a short description of an RPM file before installing it, you can use the following command:
# rpm -qpid mimersql1100-11.0.0A-24298.x86_64.rpm
An example installation using RPM could be as follows:
# sudo rpm -i mimersql1100-11.0.0A-24298.x86_64.rpm
From the Mimer SQL point of view, the RPM installation is a silent install. RPM can be instructed to be very verbose, by using the -ivv switch instead of -i, which will display the information known by, and performed by, RPM for the installed package.
You can run the installation procedure without actually installing anything by using the -test option as in the following example:
# rpm -i --test mimersql1100-11.0.0A-24298.x86_64.rpm
If an older version of an RPM package is already installed when a new RPM package is available, the upgrade switch can be used. See the following example:
# sudo rpm -U mimersql1100-11.0.0A-24298.x86_64.rpm
Note:An upgrade can only be done if the only difference in the package name is the package revision number, in this case 24298. Otherwise the new product is installed using the -i option, and then the old package is removed (see below.)
To get a listing of all installed rpm packages the -qa switch is used. Combined with grep the following command will display all Mimer SQL packages installed with the rpm command:
# rpm -qa | grep -i mimer
To get details of the package and to get instructions on how to continue, including how to create a database using the dbinstall, use the following command:
# rpm -qid mimersql1100-11.0.0A-24298
For further details about RPM, see the corresponding man-page, or visit the RPM documentation page.
To get a description of an DEB file before installing it, you can use the following command:
# dpkg-deb -I mimersql1100_11.0.0A-24298_amd64.deb
An example installation using a DEB file could be as follows:
# sudo dpkg -i mimersql1100_11.0.0A-24298_amd64.deb
From the Mimer SQL point of view, the DEB installation is a silent install, not displaying any details in operations performed.
Note:Installations that in fact is an upgrade of an existing package is handled automatically by the dpkg command.
To get a listing of all installed DEB packages the -l switch is used. Combined with grep, the following command will display all DEB packages installed for Mimer SQL with the command:
# dpkg -l | grep -i mimer
On your Debian linux system you can do man dpkg for more information on that command.
Unpack the distributed TAR archive by using a standard tar extract command, for example:
# tar xvf mimersql1100-11.0.0A-24298_linux26_64.tar
A subdirectory named according to the distribution has now been created in the current directory, holding the tar archive contents. There, the miminstall command is available, which should be executed to install the Mimer SQL software. Simply execute the command as follows:
During the miminstall session the license agreement should be accepted, a temporary location for unpacking should be chosen, and then the location for the Mimer SQL software in the file system should be specified.
The tar installation can also be executed in silent mode, mainly aimed for embedded installations.
Note:The miminstall command can be executed in a non-operational mode by using the -n option, meaning it only prints information about the installation steps without performing them.
If it is desirable to run two or more Mimer SQL versions in parallel on a host computer, this is fully feasible, but the following must be regarded:
•If installing an RPM version while a tar installation is already made, it may be the case that host global configuration files such as /etc/sqlhosts for database registration and /etc/mimerkey for the license keys are reinstalled. In this case the original files are renamed to have the file name extension .rpmsave.
•If two or more packages of the same version is to be installed, only one can be installed using RPM or DEB installation packages. For additional installations the TAR package should be used where other installation directories than /opt must be used.
•If installing using RPM or DEB, the installation will always put itself as the preferred installation, located via /usr/bin and /usr/lib, for example. This is an installation option if installing with TAR. The commands mimlink and mimunlink can be used to adjust this after installations are done, but please note that it is essential that there is an installation linked to these locations since various default settings are pointing there.
To start the installed database server and to establish connections to the database, a license key is required. A key valid for development and evaluation only is included in the Mimer SQL distribution. This key is usually installed automatically during installation of the Mimer SQL package.
Whenever a user connects to a Mimer SQL database, the computer identification and the license key will be checked by the database server to determine access rights. If access is denied, the connect attempt will be aborted and an error message will be shown.
The Mimer SQL license key contains the following (encrypted) information:
•The maximum number of users that may use the database servers running on the same computer node at any one time.
•The maximum number of network users that may use the database servers running on the same computer node at any one time.
•The node name of the computer (in the case of a specific key) or a lifeboat key which is valid for any computer of the platform type for which it was issued (e.g. any Linux machine).
•Expiration date for the key.
The key data is case insensitive and space characters are ignored.
The mimlicense application is used to administrate the license key file. See MIMLICENSE - Managing the license key in System Management Handbook for information on how to use it. The following command will list the licenses installed:
# mimlicense -l
As mentioned above, for a production system a commercial license is required. Also, expired keys may have to be renewed, or, when the number of Mimer SQL users is increased or new Mimer SQL functionality is added to the site, a new Mimer SQL license key will be needed. The Mimer SQL license key is provided by your Mimer SQL distributor. In order to be able to generate the key, your Mimer SQL distributor must know the node name of the computer on which the database server will run.
The host name of a Linux machine is obtained by using the following Linux command:
# uname -n
As mentioned before, the dbinstall command requires sudo access, or must be executed by root. If not started from a privileged shell sudo password will be asked for:
# dbinstall [<database name>]
If a database name is given, the dbinstall session is completed with default settings used as far as possible. Otherwise, during the dbinstall session, database name, database location, and password for the database administrator (i.e. SYSADM) will be asked for. There will also be options for installing example environments, etc. When the session is completed, a fully operational database is available - enabled for client/server access over TCP and automatic start at reboot.
Note:dbinstall creates all system databank files in the given database server home directory. In a production system it is recommended that the SYSDB, TRANSDB and LOGDB files are located on separate disks due to performance and reliability reasons. You can read more about this in the Mimer SQL System Management Handbook part of the Mimer SQL Documentation Set (found at the Documentation page).
Once the database is up and running it may be of interest to provide for remote access. To achieve this the database should be registered as a REMOTE on each node in the network from which it is to be accessed - see more on database registration below.
Now the database is ready for data storage, creating a storage structure build on idents and data objects using the data definition statements in Mimer SQL.
To summarize, the dbinstall command performs all necessary installation steps to create an initial database and getting it up and running. The options available in dbinstall give opportunities to control and carry out the following:
•Deciding a database home directory
•Registering the database
•Deciding the SYSADM password
•Creating the system databanks, including the data dictionary
•Deciding owner of the database
•Setting up the networking environment
•Setting up autostart procedure
•Setting up a data source definition for ODBC use
•Creating an example database
•Creating a basic development setup with a user that has an OS_USER login
•Creating the default database configuration file
•Starting the database created
Many of these tasks are described in a more general and detailed manner further on in this document.
If you are upgrading an existing database from an earlier version of Mimer SQL, please see the Mimer SQL Release Notes for detailed information. The Release Notes document is provided within each Mimer SQL distribution package. In short the steps are as follows:
1Install the new Mimer SQL version in parallel with your existing Mimer SQL.
2Stop the database.
3Make sure the new Mimer SQL version is the one accessed, and run the sdbgen -u database command from the new Mimer SQL version.
4Start the database with the database server program from the new Mimer SQL version.
What happens to the databases?
The commands described below, mimuninstall, dpkg -r and rpm -e, will remove the given software installation, but any databases using the installation will remain intact. Since databases may contain valuable data, the removal of databank files is not performed unless an explicit call to dbuninstall, specifying removal of data, is done.
If a database, and its databank files, is going to be removed, use the dbuninstall command. When executed, a question will be raised asking if specified database should be removed, i.e. permanently deleted.
# dbuninstall <database_name>
To remove an installation installed using RPM, use the following RPM command:
# rpm -e mimersql1100-11.0.0A-24298
For more detailed information printout when uninstalling, the -ev or -evv options can be used.
The following command can be used to list installed Mimer SQL packages:
# rpm -qa | grep -i mimer
To remove a DEB package installation, use the following dpkg command:
# sudo dpkg -r mimersql1100
The following command can be used to list installed Mimer SQL packages:
# dpkg -l | grep -i mimer
To remove an installation that was installed using the miminstall command, use the mimuninstall command as follows:
# mimuninstall /opt/mimersql1100-11.0.0A
When running the mimuninstall command a question will be raised on if the /etc/sqlhosts and /etc/mimerkey files should be removed. These are global files to Mimer SQL, used by any installation, so the recommendation is to leave them since there may be other Mimer SQL installations using them.
The database registration file is used to list all the databases that are accessible to a Mimer SQL application from the node on which it resides. All users must have read access to the sqlhosts file on the machine they are using in order to run applications and utilities accessing Mimer SQL databases. The standard location for this file is /etc/sqlhosts. By using the environment variable name MIMER_SQLHOSTS, another file can be used.
In a network environment, the name of a database must be registered on each node from which it is to be accessed. A database is created as a local database on the node where it resides, and it is defined as a remote database on each other node in the network from which access to it is required. For general information on how to make databases accessible, refer to Registering the Database in System Management Handbook.
The program mimsqlhosts can be used to manage the contents of the local sqlhosts file instead of editing it manually. To list the complete content of the sqlhosts file, simply use the following command:
When the dbinstall command is used to install a local database, an entry for it is automatically added to the LOCAL section of the sqlhosts file on that node, see LOCAL section.
If the file is not found, a default sqlhosts file is automatically generated. (See the mimsqlhosts and sqlhosts man-pages).
The sqlhosts file structure
The SQLHOSTS file contains three sections; DEFAULT, LOCAL and REMOTE.
The names of the local databases on the current node are listed in the LOCAL section, see LOCAL section, and the names of the remote databases accessible from the node are listed in the REMOTE section, see REMOTE section.
One of the local or remote databases can be set to be the default database for the node by specifying its name in the DEFAULT section, see DEFAULT section.
Database names may, in general, be up to 128 characters long and are case-insensitive.
A line of text beginning with the character sequence -- is interpreted as a comment in the sqlhosts file.
The default SQLHOSTS file
When the first Mimer SQL system is installed on a node, the following default sqlhosts file is automatically generated:
-- S Q L H O S T S
-- This file contains a list of all databases, local and remote, accessible
-- from the node where the file resides.
-- The DEFAULT label
-- Name of default database. Can be either a REMOTE or LOCAL database name.
-- Can be overridden by setting MIMER_DATABASE to the name of a database.
-- The LOCAL label
-- A list of all local databases on the current node, containing the
-- database name and a directory specification (Path).
-- UNIX Path - database home, and directory path for databank lookup.
-- VMS Path - database home.
-- The REMOTE label
-- A list of all remote databases containing the database name, the database
-- node, the protocol to be used, the protocol interface and the protocol
-- service to be used.
-- Protocol, Interface and Service may be defaulted by entering ''.
-- Node - network node name for computer on which the database resides.
-- Protocol - currently tcp is supported. (tcp or '' should be specified)
-- Interface - currently not used ('' should be specified).
-- Service - corresponds to the port number used in TCP/IP. The port number
-- Default is 1360, i.e. the port number reserved for MIMER.
-- On UNIX: The port number may either be a number or a name of a
-- service stored in the /etc/services file.
-- Database Path
-- ------------------ -----------------------------------------------------
-- Database Node Protocol Interface Service
-- ------------------ ------------------ -------- --------- ---------------
example_remotedb server_nodename '' '' 1360
The DEFAULT section contains a single line that specifies the default database which will be used by a Mimer SQL application or command that does not explicitly specify a database to connect to, see The Default Database section in System Management Handbook.
The default database should be one of those listed in the LOCAL or REMOTE sections.
The LOCAL section contains a list of all the local databases residing on the current machine, see The Local Database section in System Management Handbook.
Each line under the LOCAL keyword should contain two fields, separated by one or more blanks or tab characters. The first field specifies the database name, and the second specifies the location.
The location field is usually a single directory path, referred to as the database home directory. But, it may also be a colon (:) separated search path specification, where each directory included in the path list can hold databank files for the Mimer SQL database server. In that case the first directory in the search path is taken as the database home directory and the other directories in the search path will be used to locate databank files which have a file specification stored in the data dictionary without an explicit directory.
Using a path list is one way to arrange for having databank files on separate disks for optimal performance and reliability - see the System Management Handbook.
The REMOTE section contains a list of all accessible databases that reside on other nodes in the network environment, see the section Accessing a Database Remotely in System Management Handbook.
Access to these databases is provided by using TCP/IP to establish a client/server connection to the remote machine.
Each entry in the REMOTE section contains up to five fields, separated by spaces and/or tab characters.
The DATABASE field specifies the name of the remote database.
The NODE field should specify the network node name of the remote machine. If the TCP/IP interface is used, the IP address may be specified here.
The PROTOCOL field should specify tcp or two single quotation marks ''.
The INTERFACE field is currently not used. Specify '' (two single quotation marks) here.
If using TCP/IP, the SERVICE field specifies the TCP/IP port number the database server uses. The default is 1360, which has been reserved by Mimer Information Technology AB for Mimer SQL client/server communication.
When TCP/IP is used, the value in the SERVICE field may be the actual port number, the name of a service stored in the /etc/services file or two single quotation marks '' for the default value 1360.
The remote section parameters are summarized below, depending on the protocol selected. The character sequence '' is two single quotation marks, and specifies the default value for a parameter:
Remote database name
TCP/IP node name or IP number
'' or TCP/tcp
'' (two single quotation marks)
TCP/IP_port_number, TCP/IP service name or ''. (When '' is used to specify the default SERVICE, the TCP/IP port number 1360 will be used.)