...
...
...
...
...
...
...
...
...
Info |
---|
Info |
This installation guide applies to the openIMIS Database v1.3.0 and later. |
Video tutorial
Widget Connector | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
https://www.youtube.com/watch?v=9og9OThVK6E
Excerpt | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Install SQL Server
Configure SQL Server
Initialize openIMIS database Anchor | | create_db | create_db | |||||||
Note |
Code Block | ||
---|---|---|
|
SqlCmd -E –Q "CREATE DATABASE IMIS_DATABASENAME" SqlCmd -E -S SQL_Server_Name -d IMIS_DATABASENAME –i X:\PathToSQLFile\openIMIS_ONLINE.sql
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
Initialize specific openIMIS database
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
Upgrade the openIMIS database
Warning |
---|
The upgrading process should always be performed 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. |
Note |
---|
The upgrade can be done with SQL Server Management Studio (SSMS) or from the shell (be careful to adapt the querries to your setup). |
To update a production instance and to prevent impacting the production if the migration script failed because of customizations in your openIMIS instance:
During the upgrade make sure the is not reachable from the applications (you should stop the openIMIS website in Web Application IIS).
Duplicate the database using SSMS or shell (create a full backup of the database and restore it with another database name, e.g. openIMIS.1.4.0)
Shell commands (e.g. duplicate 'openIMIS.1.3.0' database to 'openIMIS.1.4.0' database; please adapt to your situation):
Code Block language powershell
SqlCmd -E -S SQL_Server_Name –Q "BACKUP DATABASE [openIMIS.1.3.0] TO DISK='X:\PathToBackupLocation\openIMIS.1.3.0.bak'" SqlCmd -E -S SQL_Server_Name –Q "RESTORE DATABASE [openIMIS.1.4.0] FROM DISK='X:\PathToBackupLocation\openIMIS.1.3.0.bak' WITH MOVE 'openIMIS.1.3.0' TO 'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA\openIMIS.1.4.0.mdf', MOVE 'openIMIS.1.3.0_log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA\openIMIS.1.4.0_log.ldf'"
Download the openIMIS database SQL files and migration scripts from Github repository (the source code ZIP file).
Execute the migration script on the copy of the database in SSMS or shell
Shell command (e.g. from the current version 1.3.0 to the new version 1.4.0)
Code Block language powershell
SqlCmd -E -S SQL_Server_Name -d openIMIS.1.4.0 –i "X:\PathToMigrationScript\openIMIS migration v1.3.0 - v1.4.0.sql"
Configure the openIMIS Web Application to use the newly migrated database (e.g. openIMIS.1.4.0).
Configure the openIMIS Backup Windows Service or your own backup application/service to use the newly migrated database (e.g. openIMIS.1.4.0).
Start your openIMIS website.
Previous step: WA2. Set up the default openIMIS instance | Go to parent: WA2. Set up the default openIMIS instance | Table of |
contents: Installation and Country Localisation | Next step: WA2.2 Web Application installation |