rhosim: fix database access