Comments
6 comments
-
We are currently working on a cmdlet to clean up after an agent has been uninstalled, which should solve your exact issue
Could you expand on the database corruption you encountered? What problems did you encounter afterwards? -
Wow thanks for the quick reply. Very glad to hear your working on it.
As for the corruption, I will try to figure out the pattern and get back to you as soon as I do.
Regards and keep up the good work!
David -
I could reproduce the corruption problem.
Here my error on PowerShell screen when I try cloning a database. Not much detail though. I also attached the event log. Seems to occurs at the same time.
I play with the same environment and VM snapshot. I go back to a blank server install, then reinstall. I believe this may cause some confusion. I can ship you the SQLClone database if it helps.
+++
New-SqlClone : InternalServerError received from server when performing POST /api/clones: An error has occurred.
At C:\TEMP\create-clone-esb.ps1:12 char:14
+ ... $image | New-SqlClone -Name $database -Location $sqlServerInstance ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-SqlClone], HttpRequestFailedException
+ FullyQualifiedErrorId : RedGate.SqlClone.PowerShell.Commands.NewSqlCloneCommand
+++ -
Hi Benethor,
The latest release of SQL Clone has a -force option.
Normally, you will want to call Remove-SqlCloneMachine -Force after destroying a VM, before starting the new VM.
If the new VM with the new agent has already been created/installed, call Remove-SqlCloneMachine -Force on the old, offline agent, and restart the agent service on the new VM. -
Great news! I will test it as soon as today.
-
I did test a dirty uninstall and I confirm it works as expected.
Kudos to the dev team!
David
Add comment
Please sign in to leave a comment.
My environments are very dynamic. I can pop and delete multiple SQL Clone agents in a day. How to I make sure my agent are cleanly uninstalled? I see my agents status as "offline".
I know it's possible to "logically delete it" from [Clones] table when inserting a timestamp in the [DeletedOn] column.
However, I did corrupt the database somehow after reinstalling an agent a second time. I am not yet certain why however.
What is the best way to do it. Do you have a plan to add an API support to unregister an agent?
thank you
David