Delete orphaned image
We have an image in SQLClone created by a server that is no longer active. When we try to delete the image, we get an error. If we remove the SQLClone machine, will it also remove the orphaned image?
Tagged:
Best Answer
-
Panagis Posts: 9 Bronze 3Hello @kbullen,
Sorry for having this issue, this is a known limitation.
If you remove the SQL Clone machine, it will not remove the orphaned images, but you can follow the following workaround.
1. Delete all clones of the image.
2. Force delete the agent using the Remove-SqlCloneMachine PowerShell cmdlet.
3. Mark the image entry on database as deleted using the following SQL query.Before running the SQL query on your production environment, please test it on a testing environment in case that something will go wrong.UPDATE [dbo].Images SET DeletedOn = GETUTCDATE() WHERE Id = <b>{ImageId}</b>
Please replace the {ImageId} with the actual image's id.
4. Delete the image from disk.Kind regards,
Panagis
Answers
Hello Kevin,
Sorry that you're having trouble with SQL Clone. Can share a screenshot of the error you get when deleting the image? Also, can you describe what you mean by removing the SQL Clone Machine? Will you just be uninstalling SQL Clone or something else?
Kind regards,
Pete Ruiz