refine dbscript