Skip to main content

Database Error when deleting a machine from AMS

Thread needs solution

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Error ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Failed to delete the machine. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Details Code: 8,326,693(0x7F0E25) Module: E:\Program Files\Acronis\AMS\ManagementServer.exe Message: The statement has been terminated. Code: 8,323,619(0x7F0223) Message: The DELETE statement conflicted with the REFERENCE constraint "FK_InstancePolicy_Policy". The conflict occurred in database "acronis_cms", table "dbo.InstancePolicy", column 'PolicyID'. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Trying to delete a machine from the AMS and gettin the above error. Any suggestions?

0 Users found this helpful

How many bumps does it take to get to the attention of a Acronis Support Engineer?

Day 1 Bump!

How many bumps does it take to get to the attention of a Acronis Support Engineer?

Day 2 Bump!

How many bumps does it take to get to the attention of a Acronis Support Engineer?

Day 3 Bump!

Suggestion - revoke all policies from it, try to delete again, reapply to the remaining ones?

Forget it Ken. It took over 5 months to finally get an acknowledgement from Acronis on the archive naming convention. Let me see ... that leaves you with roughly 147 bumps to go :)

dev-anon wrote:
Suggestion - revoke all policies from it, try to delete again, reapply to the remaining ones?

Already tried this. This machine doesnt even exist in the "All Physical Machines" but when I tried to add it again, it says:

-------------------------------------------------------------
Error
-------------------------------------------------------------
Failed to add the specified machine to the group.
-------------------------------------------------------------
Details
Code: 8,585,218(0x830002)
Module: E:\Program Files\Acronis\AMS\ManagementServer.exe
Message: The machine has been already registered.

-------------------------------------------------------------

So I used the Delete_Machine_By_Name.vbs, and it gave the error in the original post.

Jim Becher wrote:
Forget it Ken. It took over 5 months to finally get an acknowledgement from Acronis on the archive naming convention. Let me see ... that leaves you with roughly 147 bumps to go :)

Sigh....

How many bumps does it take to get to the attention of a Acronis Support Engineer?

Day 4 Bump!

How many bumps does it take to get to the attention of a Acronis Support Engineer?

Day 5 Bump!

How many bumps does it take to get to the attention of a Acronis Support Engineer?

Day 6 Bump!

Hello all,

Please accept my profound apologies for the delay with the response.

I will definitely help you.

Ken, it seems that backup policy is still applied to Agent and that is why you can't neither add nor delete the machine from AMS. So I recommend you to revoke policies once again and after that delete the machine from AMS using delete_machine_by_id.vbs script.

  • Find out the machine's GUID:
    • On the machine where the Acronis Agent is installed, open Windows Registry (Start-Run -> regedit);
    • Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Acronis\BackupAndRecovery\Settings\MachineManager
    • Double click on MMSCurrentMachineID;
    • Copy the ID (it may look like E36DCB1E-1D73-4700-8B3D-7824CAEAE5FE).
  • Download the script ZIP file and extract the VBS script inside to the C:\ root folder of the machine running the Acronis Management Server and the Acronis SQL instance;
  • Open Windows Command Line (Start-Run -> cmd);
  • In the command line, navigate to C:\;
  • Issue the following command:

    delete_machine_by_id.vbs [MachineGUID]

    For example

    delete_machine_by_id.vbs E36DCB1E-1D73-4700-8B3D-7824CAEAE5FE

Re-add the machine to the Acronis Management Server.

Please note that script will work only with Microsoft SQL Express installed with Acronis.

Feel free to reply to this thread if the issue is not fixed, I'll do my best to help you.

Thank you.

Same error. I didnt know what you meant by "revoke policies" because I had removed the machine from AMS already. It doesn't show up in the "All Physical Machines" list.

Ilya wrote:

Hello all,

Please accept my profound apologies for the delay with the response.

I will definitely help you.

Ken, it seems that backup policy is still applied to Agent and that is why you can't neither add nor delete the machine from AMS. So I recommend you to revoke policies once again and after that delete the machine from AMS using delete_machine_by_id.vbs script.

  • Find out the machine's GUID:
    • On the machine where the Acronis Agent is installed, open Windows Registry (Start-Run -> regedit);
    • Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Acronis\BackupAndRecovery\Settings\MachineManager
    • Double click on MMSCurrentMachineID;
    • Copy the ID (it may look like E36DCB1E-1D73-4700-8B3D-7824CAEAE5FE).
  • Download the script ZIP file and extract the VBS script inside to the C:\ root folder of the machine running the Acronis Management Server and the Acronis SQL instance;
  • Open Windows Command Line (Start-Run -> cmd);
  • In the command line, navigate to C:\;
  • Issue the following command:

    delete_machine_by_id.vbs [MachineGUID]

    For example

    delete_machine_by_id.vbs E36DCB1E-1D73-4700-8B3D-7824CAEAE5FE

Re-add the machine to the Acronis Management Server.

Please note that script will work only with Microsoft SQL Express installed with Acronis.

Feel free to reply to this thread if the issue is not fixed, I'll do my best to help you.

Thank you.

Attachment Size
14743-86680.JPG 26.35 KB

Hello Ken,

The message on the screen shot means that there's a policy still applied to the agent and therefore it can't be removed. To revoke a policy please connect to Acronis Management Server, go to Backup Policies and delete all backup policies. After that, please try to apply the VBS script once again and re-create backup policies.

Thank you.

Well, it I can delete the backup policy but it is a tedious task to recreate them again. If you guys can make it so that I can easily export and import the policies, then I'll be more inclined to delete the backup policies.