• Detach attach is the problem because if process failed detach the database is not exists. If rename failed you have the old database working