Database installation
Last updated
Last updated
openIMIS has been developed and tested using SQL Server 2017. Newer or old versions might require adaptations to both these installation guide and openIMIS code.
Download the desired version of SQL Server (for example, if you want to test openIMIS, you can download and install SQL Server 2017 Developer version - not for production).
When the installation wizard opens, select the manual configuration option in order to fine-tune the installation process.
On the Features selection:
In Shared Feature
section, select SQL Client Connectivity SDK
For installations with Data Warehouse, select Analysis Services
, Reporting Services
and Integration Services
(not available for the Express edition)
On the Instance configuration, the default name SQLEXPRESS
can be used, unless it is already used by another instance.
On Database engine configuration, select Mixed Mode
(SQL Server authentication and Windows authentication) in Authentication Mode.
Continue the setup process until the installation is complete.
Open the SQL Server Configuration Manager.
On the left panel, select SQL Server Network Configuration
→ Protocols for SQLEXPRESS
(or the name of your SQL Server instance) → Enable Named Pipes and TCP/IP.
Select SQL Server Services → right-click on SQL Server instance name and select Restart.
To facilitate the setting up of the openIMIS database, we suggest installing SQL Server Management Studio (SSMS). The following procedure is based on SSMS, but you can use the standard SQL Server prompt to proceed with the setup.
First, download the openIMIS database SQL files and migration scripts from Github repository (the source code ZIP file).
If you wish to initialize the database using SSMS, follow the steps:
Create a new database for the openIMIS instance (e.g. openIMIS.1.4.0, where 1.4.0 is the openIMIS database version).
Open the openIMIS_ONLINE.sql file (from the Empty databases folder) and execute the script (make sure the selected database is the one created in previous step)
If you prefer to initialize the database using the shell, run the following command:
Be careful to adapt the queries to your setup, in the command lines example those assumptions were made: the database is called IMIS_DATABASENAME
. The SQL server is called SQL_Server_Name
.
Create a dedicated user with full privilege on the openIMIS database only:
In the Security → Logins → right-click and select “New Login…”
In General page:
Give a login name (e.g. ImisUser)
Select SQL Server authentication and provide a password
Unselect Enforce password expiration
Change the default database to openIMIS
In User Mapping page:
Map openIMIS database to ImisUser user
Give the role of db_owner
There are three specific openIMIS databases to chose from:
Offline (openIMIS_OFFLINE.sql): this mode is used for remote insurance offices without Internet connectivity. Note: the synchronization of data with the central server is manual.
Offline HF (openIMIS_OFFLINE_HF.sql): this mode can be used in remote health facilities without Internet connectivity. Note: the synchronization of data with the central server is manual.
Demo (openIMIS_demo_ONLINE.sql): this script initialize the empty database with the demo dataset.
To initialize one of the specific openIMIS databases, follow the steps:
Initialize the openIMIS database by following the previous section steps
Run the specific database script on the already initialized openIMIS database
The upgrading process should always be performed first on a copy of the database to ensure the proper execution of the migration script. In case of any issue arriving from the upgrading process, you can get back to the previous version of the database. Please report using openIMIS Service Desk any issue you may face in the upgrading process.
The upgrade can be done with SQL Server Management Studio (SSMS) or from the shell (be careful to adapt the queries to your setup).
During the upgrade make sure the is not reachable from the applications (you should stop the openIMIS website in Web Application IIS).
Duplicate the openIMIS database using SSMS (create a full backup of the database and restore it with another database name, e.g. openIMIS.1.4.0) or shell (see following command).