Added sql script and fixed remove dao sql errors