Back to OIM Explorer

dbo.QBM_TUDialogTimeZone

Database TriggerSQL_TRIGGERSandbox DB

Database Trigger on DialogTimeZone. Bulk DBQueue insert -> QBM-K-CommonStateUTCOffset / QBM_ZStateUTCOffset at line 6; Bulk DBQueue insert -> QBM-K-CommonCountryUTCOffset / QBM_ZCountryUTCOffset at line 6; Bulk DBQueue insert -> QBM-K-CommonCountryUTCOffset / QBM_ZCountryUTCOffset at line 9; References QBM_PDBQueueInsert_Bulk

Source: sandbox-db sys.sql_modules

Source size: 1.541 characters

Interpretation

  • Database trigger. Treat parent table and enqueue/object-layer calls as the main relation points.
  • DBQueue relation detected. Follow the task procedure and referenced-by list for async processing.

Relations

  • Bulk DBQueue insert -> QBM-K-CommonStateUTCOffset / QBM_ZStateUTCOffset at line 6
  • Bulk DBQueue insert -> QBM-K-CommonCountryUTCOffset / QBM_ZCountryUTCOffset at line 6
  • Bulk DBQueue insert -> QBM-K-CommonCountryUTCOffset / QBM_ZCountryUTCOffset at line 9
  • References QBM_PDBQueueInsert_Bulk
  • Trigger parent table: DialogTimeZone

Typed Edges

  • queues DBQueue task QBM_ZStateUTCOffset at line 6 Bulk DBQueue insert -> QBM-K-CommonStateUTCOffset / QBM_ZStateUTCOffset at line 6
  • queues DBQueue task QBM_ZCountryUTCOffset at line 6 Bulk DBQueue insert -> QBM-K-CommonCountryUTCOffset / QBM_ZCountryUTCOffset at line 6
  • queues DBQueue task QBM_ZCountryUTCOffset at line 9 Bulk DBQueue insert -> QBM-K-CommonCountryUTCOffset / QBM_ZCountryUTCOffset at line 9
  • trigger on table DialogTimeZone Trigger parent table: DialogTimeZone
  • references source dbo.QBM_FGISessionContext source text reference
  • references source dbo.QBM_PDBQueueInsert_Bulk source text reference
  • references source dbo.QBM_PSessionErrorAdd source text reference

References

Referenced By

  • No direct source references extracted.

Complete Source

SQL68 lines
1CREATE trigger QBM_TUDialogTimeZone2  ON DialogTimeZone FOR3UPDATE NOT FOR Replication4AS5BEGIN6  BEGIN TRY7    IF EXISTS(8      SELECT TOP 1 19      FROM inserted)10    GOTO start11    IF EXISTS(12      SELECT TOP 1 113      FROM deleted)14    GOTO start15    RETURN start:16    DECLARE @GenProcID varchar(38)17    SELECT @GenProcID = dbo.QBM_FGISessionContext('')18    DECLARE @DBQueueElements_01 QBM_YDBQueueRaw19    INSERT INTO @DBQueueElements_01(object,20    subobject,21    genprocid)22    SELECT23      x.uid,24      NULL,25      @GenProcID26    FROM(27    SELECT28      DISTINCT h.uid_DialogState AS uid29    FROM dialogTimeZone i30    JOIN deleted d31      ON i.uid_DialogTimeZone = d.uid_DialogTimeZone32    JOIN dialogStateHasTimezone h33      ON i.uid_DialogTimeZone = h.uid_DialogTimeZone34    WHERE35      isnull(i.UTCOffset, 0) <> isnull(d.UTCOffset, 0) OR isnull(i.IsDayLightSaving, 0) <> isnull(d.IsDayLightSaving,36    0)) AS x37    EXEC QBM_PDBQueueInsert_Bulk 'QBM-K-CommonStateUTCOffset',38      @DBQueueElements_0139    DECLARE @DBQueueElements_02 QBM_YDBQueueRaw40    INSERT INTO @DBQueueElements_02(object,41    subobject,42    genprocid)43    SELECT44      x.uid,45      NULL,46      @GenProcID47    FROM(48    SELECT49      DISTINCT h.uid_DialogCountry AS uid50    FROM dialogTimeZone i51    JOIN deleted d52      ON i.uid_DialogTimeZone = d.uid_DialogTimeZone53    JOIN DialogCountryHasTimezone h54      ON i.uid_DialogTimeZone = h.uid_DialogTimeZone55    WHERE56      isnull(i.UTCOffset, 0) <> isnull(d.UTCOffset, 0) OR isnull(i.IsDayLightSaving, 0) <> isnull(d.IsDayLightSaving,57    0)) AS x58    EXEC QBM_PDBQueueInsert_Bulk 'QBM-K-CommonCountryUTCOffset',59      @DBQueueElements_0260  END TRY61  BEGIN CATCH62    EXEC QBM_PSessionErrorAdd DEFAULT63    RAISERROR('',64    18,65    1)66      WITH NOWAIT67  END CATCH68END
Open raw exported source
SQL ยท Raw11 lines
1 create   trigger QBM_TUDialogTimeZone on DialogTimeZone  for Update not for Replication as begin  BEGIN TRY if exists (select top 1 1 from inserted2) goto start if exists (select top 1 1 from deleted) goto start return start: declare @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext3('') declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, @GenProcID from (select4 distinct h.uid_DialogState as uid from dialogTimeZone i join deleted d on i.uid_DialogTimeZone = d.uid_DialogTimeZone join dialogStateHasTimezone h on5 i.uid_DialogTimeZone = h.uid_DialogTimeZone where isnull(i.UTCOffset, 0) <> isnull(d.UTCOffset, 0) or isnull(i.IsDayLightSaving, 0) <> isnull(d.IsDayLightSaving6, 0) ) as x exec QBM_PDBQueueInsert_Bulk 'QBM-K-CommonStateUTCOffset', @DBQueueElements_01 declare @DBQueueElements_02 QBM_YDBQueueRaw insert into @DBQueueElements_027 (object, subobject, genprocid) select x.uid, null, @GenProcID from (select distinct h.uid_DialogCountry as uid from dialogTimeZone i join deleted d on8 i.uid_DialogTimeZone = d.uid_DialogTimeZone join DialogCountryHasTimezone h on i.uid_DialogTimeZone = h.uid_DialogTimeZone where isnull(i.UTCOffset, 09) <> isnull(d.UTCOffset, 0) or isnull(i.IsDayLightSaving, 0) <> isnull(d.IsDayLightSaving, 0) ) as x exec QBM_PDBQueueInsert_Bulk 'QBM-K-CommonCountryUTCOffset'10, @DBQueueElements_02 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH end 11