Improve client db access script.