1183-How to clear out active and pending commands - NOTE Last Resort!

Prev Next

How to clear out active and pending commands - NOTE: Last Resort!

In the rare scenario that there are Active (pending) commands that can't be cleared out using the tools in the SES Console GUI, here is a set of SQL queries that can be used clear all active and pending.

Step 1 - Find out how many commands are currently active

SELECT count(*) as count1 FROM [dbo].[Commands] WHERE [Status] = 1

SELECT count(*) as count2 FROM [dbo].[CompUsers] WHERE [Node_Status_Index] is not NULL AND [Node_Status_Index] !=0

SELECT count(*) as count3 FROM [dbo].[tblDBKs] WHERE [Node_Status_Index] is not NULL AND [Node_Status_Index] !=0

SELECT count(*) as count4 FROM [dbo].[Computers] WHERE [Node_Status_Index] is not NULL AND [Node_Status_Index] !=0

SELECT count(*) as count5 FROM [dbo].[Computers] WHERE [FFE_Status_Index] is not NULL AND [FFE_Status_Index] != 0

 

If the above SQL commands yield a high count of active commands, then:

1 - Backup the Database

2 - Stop all WinMagic services

3 - Run one of these sets of commands to clear the appropriate table of active commands:

 

UPDATE [dbo].[Computers] SET [Node_Status_Index] = 0 WHERE [Node_Status_Index] is not NULL AND [Node_Status_Index] !=0

UPDATE [dbo].[Computers] SET [FFE_Status_Index] = 0 WHERE [FFE_Status_Index] is not NULL AND [FFE_Status_Index] !=0

UPDATE [dbo].[tblDBKs] SET [Node_Status_Index] = 0 WHERE [Node_Status_Index] is not NULL AND [Node_Status_Index] !=0

UPDATE [dbo].[CompUsers] SET [Node_Status_Index] = 0 WHERE [Node_Status_Index] is not NULL AND [Node_Status_Index] !=0

 

Many thanks to Marty Milbert for the above method.