Flood safe db access.