Fixes to make specimen hierarchy creation script work with Oracle