Comments
1 comment
-
Hi,
For the benefit of anyone else viewing this forum post, this was the solution I presented in the direct ticket:
In this case, I think you should use the -Force parameter for removing SqlCloneMachine: https://documentation.red-gate.com/clone/automation/powershell-cmdlet-reference/remove-sqlclonemachineIf the machine no longer exists, you can use the -Force parameter to remove the machine from SQL Clone even though there were still clones on the machine.
For removal of the image, the documentation mentions the -Soft parameter: https://documentation.red-gate.com/clone/automation/powershell-cmdlet-reference/remove-sqlcloneimage-Soft <System.Management.Automation.SwitchParameter>
Specifies that the image should be removed from SQL Clone without deleting the underlying image files. This can be useful if the image cannot be deleted normally because the agent that created it is no longer in use.
Add comment
Please sign in to leave a comment.
I received these errors:
Remove-SqlCloneImage : Agent on '<SERVER>' is not connected. Reconnect this agent and try again.
Remove-SqlCloneMachine : Cannot delete agent on <SERVER> because there are still images created by this agent
Does anyone have the proper way to remove sql clone images / agents that are no longer available to connect to?
solution:
To remove the sqlclone image: Remove-SqlCloneImage -Image $ImageToDelete -soft
To remove the sqlclone machine: Remove-SqlCloneMachine -Machine $AgentToDelete -force