DHIS2 2.25 Uses DhisH2 DB by default

30 views
Skip to first unread message

Barnabas Akumba

unread,
Apr 4, 2017, 2:48:34 PM4/4/17
to DHIS2 system administrators
Hello All,

I created an instance of DHIS2 using DHIS2-Tools and discovered that the instance uses the H2 Database instead of the Postgres DB.
Could this be an issue with my Server settings or it a default behaviour for this version?

Regards

Barnabas Akumba

Bob Jolliffe

unread,
Apr 4, 2017, 2:54:22 PM4/4/17
to Barnabas Akumba, DHIS2 system administrators
Hi Barnabas

It is the default setting.  To use postgresql you should adjust the dhis.conf settings manually.

I think dhis2-tools is a bit fiddly anyway.  If you need to run dhis2 on windows you might be better off just using ubuntu+dhis2-tools in a virtual machine.

Cheers
Bob

--
You received this message because you are subscribed to the Google Groups "DHIS2 system administrators" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dhis2-system-administrators+unsub...@googlegroups.com.
To post to this group, send email to dhis2-system-administrators@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/dhis2-system-administrators/dbf8a625-b860-46a9-a0b4-1484a63bf71c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Barnabas Akumba

unread,
Apr 4, 2017, 2:58:35 PM4/4/17
to Bob Jolliffe, DHIS2 system administrators
Thanks Bob.
The instance is on an Ubuntu Server. Was surprise that other instances created with war files below 2.25 automatically used the Postgres DB but 2.25 was using DhisH2 DB.

Regards

On Tue, Apr 4, 2017 at 7:54 PM, Bob Jolliffe <bobjo...@gmail.com> wrote:
Hi Barnabas

It is the default setting.  To use postgresql you should adjust the dhis.conf settings manually.

I think dhis2-tools is a bit fiddly anyway.  If you need to run dhis2 on windows you might be better off just using ubuntu+dhis2-tools in a virtual machine.

Cheers
Bob
On 4 April 2017 at 19:48, Barnabas Akumba <akumb...@gmail.com> wrote:
Hello All,

I created an instance of DHIS2 using DHIS2-Tools and discovered that the instance uses the H2 Database instead of the Postgres DB.
Could this be an issue with my Server settings or it a default behaviour for this version?

Regards

Barnabas Akumba

--
You received this message because you are subscribed to the Google Groups "DHIS2 system administrators" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dhis2-system-administrators+unsubs...@googlegroups.com.




--
 
Barnabas AKUMBA
Skype: barnabas.akumba

Bob Jolliffe

unread,
Apr 4, 2017, 3:19:27 PM4/4/17
to Barnabas Akumba, DHIS2 system administrators
Ah sorry Barnabas for causing confusion.  I was mis-reading your mail and thought you were referring to dhis2-lite!!!  Please ignore what i have said in previous mail.

The way it goes is:

If you create an instance with dhis2-tools and the postgres database is on the same server it will by default create a postgres database and user and use that.

If you are using a different database or it is on another server you need to make the dhis.conf manually (that could be improved).

You can explicitly specify not to create a database with "-n" flaf when creating an instance.

If there is no dhis.conf or the connection specified in it fails to connect, only then will the dhis2 web application create an in memory h2 database as a last resort.

There is nothing fundamental in the above that has changed with 2.25.  You might have an old copy of dhis2-tools which is using hibernate.properties instead of dhis.conf?

Barnabas Akumba

unread,
Apr 4, 2017, 4:53:36 PM4/4/17
to Bob Jolliffe, DHIS2 system administrators
Hello Bob,

Thanks for the clarification.

Regards

Barnabas Akumba

unread,
Apr 5, 2017, 2:59:15 AM4/5/17
to Bob Jolliffe, DHIS2 system administrators
Hello Bob/All,
I've been able to change the DB from H2 to postgres.
The problem now is when I import the Metadata I exported from the H2 DB into the PostgresDB. It shows a successful summary but afterwards I can't find the items in the DB.
Could there be a compatibility issue between the H2 DB and PostgresDB?
Any way out of this?

Regards

Bob Jolliffe

unread,
Apr 5, 2017, 4:23:33 AM4/5/17
to Barnabas Akumba, DHIS2 system administrators
Barnabas send me a copy of your metadata xml off list.  It is not likely to be related to h2/postgres compatibility.  But hard to know what other issues might lurk ...

Bamutura Moses

unread,
Nov 3, 2017, 8:25:25 AM11/3/17
to DHIS2 system administrators
Hello Barnabas, kindly advise how you managed to switch the connection from H2 to postgres.

stev austin

unread,
Sep 5, 2018, 2:04:05 PM9/5/18
to DHIS2 system administrators
hello
please how can i create multiple dhis2 instances on one server
thanks


On Tuesday, April 4, 2017 at 7:54:22 PM UTC+1, Bob Jolliffe wrote:
Hi Barnabas

It is the default setting.  To use postgresql you should adjust the dhis.conf settings manually.

I think dhis2-tools is a bit fiddly anyway.  If you need to run dhis2 on windows you might be better off just using ubuntu+dhis2-tools in a virtual machine.

Cheers
Bob
On 4 April 2017 at 19:48, Barnabas Akumba <akumb...@gmail.com> wrote:
Hello All,

I created an instance of DHIS2 using DHIS2-Tools and discovered that the instance uses the H2 Database instead of the Postgres DB.
Could this be an issue with my Server settings or it a default behaviour for this version?

Regards

Barnabas Akumba

--
You received this message because you are subscribed to the Google Groups "DHIS2 system administrators" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dhis2-system-administrators+unsub...@googlegroups.com.
To post to this group, send email to dhis2-system-...@googlegroups.com.

Abdoulwahabou Souley

unread,
Sep 5, 2018, 3:36:00 PM9/5/18
to stev austin, DHIS2 system administrators
Hi stev 
With the Dhis2-tools you can achieve your goal. Just install it. 
You can find more about the Dhis2-tools at chapter 20 of the implémentation guide documentation. 

Souley Abdoulwahabou
Ingénieur Administration Système
Ingénieur Réseaux Télécom
Développeur d'Application
Tel: 227 96-49-81-52 / 90-83-59-63
To unsubscribe from this group and stop receiving emails from it, send an email to dhis2-system-admini...@googlegroups.com.

To post to this group, send email to dhis2-system-...@googlegroups.com.

gerald thomas

unread,
Sep 5, 2018, 4:29:48 PM9/5/18
to stev austin, DHIS2 system administrators
Hi Stev,
Are you using the dhis2-tool during your installation?

On Wed, 5 Sep 2018 at 18:04, stev austin <stevau...@gmail.com> wrote:
hello
please how can i create multiple dhis2 instances on one server
thanks

On Tuesday, April 4, 2017 at 7:54:22 PM UTC+1, Bob Jolliffe wrote:
Hi Barnabas

It is the default setting.  To use postgresql you should adjust the dhis.conf settings manually.

I think dhis2-tools is a bit fiddly anyway.  If you need to run dhis2 on windows you might be better off just using ubuntu+dhis2-tools in a virtual machine.

Cheers
Bob
On 4 April 2017 at 19:48, Barnabas Akumba <akumb...@gmail.com> wrote:
Hello All,

I created an instance of DHIS2 using DHIS2-Tools and discovered that the instance uses the H2 Database instead of the Postgres DB.
Could this be an issue with my Server settings or it a default behaviour for this version?

Regards

Barnabas Akumba

--
You received this message because you are subscribed to the Google Groups "DHIS2 system administrators" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dhis2-system-admini...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "DHIS2 system administrators" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dhis2-system-admini...@googlegroups.com.

To post to this group, send email to dhis2-system-...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
Regards,
 
Gerald
Reply all
Reply to author
Forward
0 new messages