set sql back to defaults and set perms