Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

When you want to delete devices in bulk

The following

...

stored procedure will add the DeviceID 3, 4, 5, 6, 7, 8, 20, 35, 23 to queue to delete the device. (Deletedby is to mimic what the UI would do)

Code Block
languagesql
Example:
execExec [model].[sendDeviceToDeletionQueue] @deviceID = 3
exec model.sendDeviceToDeletionQueue 4
exec model.sendDeviceToDeletionQueue 5
exec model.sendDeviceToDeletionQueue 6
exec model.sendDeviceToDeletionQueue 7
exec model.sendDeviceToDeletionQueue 8
exec model.sendDeviceToDeletionQueue 20
exec model.sendDeviceToDeletionQueue 35
exec model.sendDeviceToDeletionQueue 23

select * from Model.DeviceDeletionQueue

Image Removed

...

, @deletedBy = test
Exec [model].[sendDeviceToDeletionQueue] @deviceID = 4, @deletedBy = test
Exec [model].[sendDeviceToDeletionQueue] @deviceID = 5, @deletedBy = test
Exec [model].[sendDeviceToDeletionQueue] @deviceID = 6, @deletedBy = test
Exec [model].[sendDeviceToDeletionQueue] @deviceID = 7, @deletedBy = test
Exec [model].[sendDeviceToDeletionQueue] @deviceID = 8, @deletedBy = test
Exec [model].[sendDeviceToDeletionQueue] @deviceID = 20, @deletedBy = test
Exec [model].[sendDeviceToDeletionQueue] @deviceID = 35, @deletedBy = test
Exec [model].[sendDeviceToDeletionQueue] @deviceID = 23, @deletedBy = test

To check the status of the devices that are currently queued.

SQL Statement:

Code Block
languagesql
select * from Model.DeviceDeletionQueue

Image Added


To view all the data that is deleted

select * from model.DeviceDeletionDiagnostics with (nolock)


Note

The Delete can still be used in the UI as the same stored procedure runs when you confirm the deletion from the UI.


Delete Device from UI

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@1fb5c7
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "kb-how-to-article" and type = "page" and space = "CSKB"
labelskb-how-to-article

...