Database connection termination