Release 4.1.0 – Lessons Learned in Development

Using IBM Db2 with IBM FHIR Server

I spent a lot of time documenting the multi-tenancy schema and how the migration works in Db2.

Some of the critical links, the team updated, and I authored are:

Interestingly, I spent the most time documenting the schema and how it supports the multi-tenancy with the following pattern:

Using ibm/db2 docker and using with IBM FHIR Server

Use the following Dockerfile from this folder fhir-install/docker.

docker build -t fhirdb Dockerfile-db2 --squash

If you create the Db2 container without the above Dockerfile, please be sure to do the following:

  1. Add the trial license.

/opt/ibm/db2/V11.5/adm/db2licm -a /var/db2/db2trial.lic

  1. Update the Instance Memory Configuration
su - db2inst1 -c "db2 update dbm cfg using INSTANCE_MEMORY AUTOMATIC"
  1. Create the Db2 database with 32K pagesize
su - db2inst1 -c "db2 CREATE DB FHIRDB using codeset UTF-8 territory us PAGESIZE 32768"
  1. Add a Db2 user
groupadd -g 1002 fhir && \
    useradd -u 1002 -g fhir -M -d /database/config/fhirserver fhirserver && \
    echo "change-password" | passwd --stdin fhirserver
su - db2inst1 -c "db2 \"connect to fhirdb\" && db2 \"grant connect on database TO USER fhirserver\""
  1. Run the Schema creation with a small pool
–prop-file fhir-persistence-schema/
–schema-name FHIRDATA
–pool-size 2
  1. Create a new tenant
–prop-file fhir-persistence-schema/
–schema-name FHIRDATA
–allocate-tenant TNT1
  1. Contents of are

Good luck with Docker/IBM FHIR Server

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.