Microsoft SQL Server
We recommend that the network latency between the SQL server and M&M Central is no more than 5 ms. Otherwise, the performance of M&M in conjunction with SQL Server can’t be guaranteed to be acceptable. We recommend that the SQL Server database is managed and maintained by a database administrator (DBA).
Setting up the Database
Micetro requires that a blank database is created on the database server, with the collation SQL_Latin1_General_CP1_CS_AS, and a login (Windows or SQL server authenticated) that has db_owner access to that database and an effective default schema of mmCentral.
The CreateDatabase.sql is a suggestion for the database and database server setup. Please note that this script also configures the SQL server itself, which is unnecessary and undesirable in most cases. Therefore, review the script with your database administrator and only run appropriate parts of it.
Before you run the script please go through the script and change the necessary entries accordingly. This includes path strings (default C:/Data) and very important also the password, which is set by default to “1234” in the script!
The script is preconfigured for an 8 core processor machine, i.e. as a best practice we recommend to create for each processor core one temp file. If you have only a two core machine please comment out the last 6 temp file creation commands in the script.
The script will, without confirmation, drop the existing database using the name “mmsuite”! Make a manual backup to avoid possible data loss.
Subsequently the script will create:
a user “mmSuiteDBUser” with the password that you have inserted in the script.
an empty database with the name “mmsuite” and the following collation:
For further details take a look at the CreateDatabase.sql script.
Configuring the connection parameters
If you’re configuring MS SQL on a dedicated server, make sure to enable the TCP/IP protocol with the SQL Configuration Manager.
Men&Mice Central running on Windows
To use Windows Authentication with Micetro and Microsoft SQL Server, make sure Men&Mice Central is running under an Active Directory service account that is a member of the local administrators group.
preferences.cfg file in the data directory contains (beside the fingerprint of Central, i.e. the “password” XML-tag) four additional XML tags:
preferences.cfg file for normal user/password authentication should look like:
1<password value="plaintext:PASSWORD"/> 2<database value="MSSQL"/> 3<databaseserver value="<name or ip of the SQL server>\<name of instance, e.g. SQLEXPRESS>@,<name of database, e.g. micetro"/> 4<databaseusername value="mmSuiteDBUser"/> 5<databasepassword value="plaintext:DBPASSWORD"/>
plaintext: directive in the password inputs allows you to enter the passwords in plaintext, which Central will automatically encrypt and replace with the hash during first startup.
preferences.cfg file for the Windows Authentication method should look like (
databaseusername tag must be present and the value attribute must be set to empty string):
1<password value="the fingerprint hash"/> 2<database value="MSSQL"/> 3<databaseserver value="<name or ip of the SQL server>\<name of instance, e.g. SQLEXPRESS>@,<name of database, e.g. mmsuite"/> 4<databaseusername value=""/>
Restart Central and verify it’s running. If the database connection fails, the service will fail to start with the appropriate error message.
Men&Mice Central running on Linux
A ODBC driver will need to be installed on the Linux machine to be able to use Microsoft SQL Server.
Navigate to the data directory of the Men&Mice Central, usually located in
preferences.cfg file with in that directory with the following:
1<Database value="MSSQL" /> 2<DatabaseServer value="ip/dns name of SQL server><,port>\<Instance name>@<Database name>" /> 3<DatabaseUsername value="mmSuiteDBUser" /> 4<DatabasePassword value="plaintext:<your password here>" />
DatabasePassword value is prefixed by
plaintext:, it will be replaced by Men&Mice Central for a password hash during start up.
Connecting to the MS SQL database
Restarting the Men&Mice Central service with the new preferences file should connect the Men&Mice Central to your freshly created database. The Men&Mice Central creates the database schema (tables…) during the first connection.
Since the database was freshly created you can now follow the normal installation procedure.
Restart Central and verify it’s running:
systemctl restart mmcentral systemctl status mmcentral
If the database connection fails, the service will fail to start with the appropriate error message.