Commit before switch database