Detach and reattach the affected database.