Cleanly uninstall an agent
Hello,
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
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
Tagged:
Best Answers
-
Benethor Posts: 22 Bronze 1I 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
+++ -
Dan B Posts: 287 Gold 5Hi 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.Kind regards,
Dan Bainbridge
Product Support Engineer | Redgate Software
Answers
Could you expand on the database corruption you encountered? What problems did you encounter afterwards?
Redgate Software
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
Kudos to the dev team!
David