Views:
Dear RMS Customer,

We think that your issue can be solved based upon the knowledge article below.

 
Knowledge Article Title: Create a data gap for another device via an SQL query.
Description: In some cases a data gap event needs to be created for a device/measuring point where no data gap event exists, this can be done via an SQL query.
Keywords: SQL query, data gap
 
Software Edition: On-premis
Software Version: V1.2
R&D Project Number: N/A
Product Part Number: N/A
Product Firmware Version: N/A
 
Issue: In some cases a data gap event needs to be created for a device/measuring point where no data gap event exists, this can be done via an SQL query.
Solution:

Step 1: clone an existing event (123) to create a new event:

USE [RMS]
GO

INSERT INTO [dbo].[AlarmItems]
           ([BeginTime]
           ,[EndTime]
           ,[Status]
           ,[Level]
           ,[Category]
           ,[Typ]
           ,[Confirmed]
           ,[Source]
           ,[SourceId]
           ,[Target]
           ,[TargetId]
           ,[Details]
           ,[CommandId]
           ,[RetryCount]
           ,[Inhibited]
           ,[RepeatTime]
           ,[CompanyId]
           ,[ConfirmCount]
           ,[Hash]
           ,[Commented]
           ,[Confirmed2])
     SELECT
           [BeginTime]
           ,[EndTime]
           ,[Status]
           ,[Level]
           ,[Category]
           ,[Typ]
           ,[Confirmed]
           ,[Source]
           ,[SourceId]
           ,[Target]
           ,[TargetId]
           ,[Details]
           ,[CommandId]
           ,[RetryCount]
           ,[Inhibited]
           ,[RepeatTime]
           ,[CompanyId]
           ,[ConfirmCount]
           ,[Hash]
           ,[Commented]
           ,[Confirmed2]
    FROM [dbo].[AlarmItems]
    WHERE ID=123
GO

Step 2: Change the device ID (99) in the new event (456). As soon as the device ID has been changed, then the event will appear in RED in the audit trail.

USE [RMS]
GO

UPDATE [dbo].[AlarmItems]
   SET [TargetId] = 99
 WHERE ID=456
GO

Step 3: Service manager restart and application pool restart.

Details: N/A

Please let us know if this has helped solve your issue. If so, we will close this support case. If not, we will explore other possibilities.

Thank you and best regards,
Your RMS Support Team.