← Back to team overview

dhis2-devs team mailing list archive

hibernate_sequence

 

When importing metadata (e.g. orgunit hierarchies), one sometimes ends up
using externally generated IDs, that will then conflict with the Postgres
hibernate_sequence. If this is not resolved, new orgunits added through
DHIS2 will give errors when DHIS2 gets nextval from the sequence and tries
an insert. The current value of the sequence can be set like this:

 *SELECT *setval('hibernate_sequence', 1010);
http://www.java2s.com/Code/PostgreSQL/Sequence/Usingsetvalfunctiontosetsequencevalue.htm

It should also be possible to call the sequence directly over ODBC:
http://www.techonthenet.com/access/queries/passthrough2.php

Knut

Follow ups