SQL Server - Manual Device Deletion

SQL Server - Manual Device Deletion

If you need to remove a device from the dashboard and it is not possible to use the Delete button on the Administration > Devices page, you can do it through SQL Management Studio.

 

Marking a Device as Deleted

In Management Studio run the following query to bring up a list of devices.

select * from eg.device 

Find the device you want to delete and copy the device_id.  Run the following query replacing <device_id to mark deleted> with the actual device_id.

DECLARE @PROP_VAL_ID DOM_IDENT_REQ
EXECUTE EG.PROP_VAL_ADD_BY_NAME @PROP_VAL_ID, <device_id to mark deleted>, 'Deleted', NULL, 1
    • Related Articles

    • SQL Server - Removing (1) from Device Names on the Dashboard

      If a duplicate name occurs on one of the Device Gateways the SQL server will add (1) to the end of the name to distinguish it from the original. Once the duplicate naming issue is solved you may want to remove the (1) from the end of the device name. ...
    • SQL Server - Removing a Black Box (Offline) Device from the Dashboard

      If a device is offline (server can't communicate with it) for more than 15 minutes its icon will turn into a black box with a white question mark inside. If this device is from a Device Gateway that has been improperly decommissioned you can remove ...
    • SQL Server - Query for Generating Device, Point and Alarm List

      The SQL query for generating a device, point, and alarm list is as follows: SELECT TAG.LABEL AS URL , D.NAME AS DEVICE , P.NAME AS POINT , ISNULL(E.DESCR,'') AS ALARM FROM EG.POINT AS P JOIN EG.DEVICE AS D ON P.OBJ_ID = D.DEVICE_ID JOIN EG.CONT_ADDR ...
    • SQL Server - Fixing Remote Edit Button

      If the Remote Edit button sends you to an error page or the wrong Device Gateway here is how to fix it. Run the following query to generate a complete picture of the tables used to generate the remote edit URLs. select d.name,d.device_id, ...
    • SQL Server - Adding Templates to Bulk Upload Menu

      The steps to add a Device Template to the bulk upload menu on OpendataEE are: 1) Move the completed template into the appropriate directory. The default root device template directory is: C:\Program ...