script to dump db records