Back to OIM Explorer

dbo.QER_TUAccProduct

Database TriggerSQL_TRIGGERSandbox DB

Database Trigger on AccProduct. Bulk DBQueue insert -> QER-K-ShoppingRackProductNode / QER_ZITShopCheckMethodPR at line 7; Bulk DBQueue insert -> QER-K-ShoppingRackProductNode / QER_ZITShopCheckMethodPR at line 7; Bulk DBQueue insert -> QER-K-ShoppingRackProductNode / QER_ZITShopCheckMethodPR at line 9; References QBM_PDBQueueInsert_Bulk

Source: sandbox-db sys.sql_modules

Source size: 1.546 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 -> QER-K-ShoppingRackProductNode / QER_ZITShopCheckMethodPR at line 7
  • Bulk DBQueue insert -> QER-K-ShoppingRackProductNode / QER_ZITShopCheckMethodPR at line 7
  • Bulk DBQueue insert -> QER-K-ShoppingRackProductNode / QER_ZITShopCheckMethodPR at line 9
  • References QBM_PDBQueueInsert_Bulk
  • Trigger parent table: AccProduct

Typed Edges

  • queues DBQueue task QER_ZITShopCheckMethodPR at line 7 Bulk DBQueue insert -> QER-K-ShoppingRackProductNode / QER_ZITShopCheckMethodPR at line 7
  • queues DBQueue task QER_ZITShopCheckMethodPR at line 9 Bulk DBQueue insert -> QER-K-ShoppingRackProductNode / QER_ZITShopCheckMethodPR at line 9
  • trigger on table AccProduct Trigger parent table: AccProduct
  • 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 source dbo.QER_PITShopHelperFill source text reference
  • references source dbo.QER_PITShopHelperFill_Recalc source text reference

Complete Source

SQL85 lines
1CREATE trigger QER_TUAccProduct2  ON AccProduct 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    IF19    UPDATE(UID_OrgRuler)20    BEGIN21      DECLARE @RecalcParameter_01 QBM_YCursorBuffer22      INSERT INTO @RecalcParameter_01(UID1,23      ObjectKey1,24      Ident1)25      SELECT26        'QER-PWODecisionRule-OA',27        i.XObjectKey,28        'I'29      FROM inserted i30      EXEC QER_PITShopHelperFill_Recalc @RecalcParameter_01,31        @GenprocID32    END33    IF34    UPDATE(UID_PWODecisionMethod)35    BEGIN36      DECLARE @DBQueueElements_01 QBM_YDBQueueRaw37      INSERT INTO @DBQueueElements_01(object,38      subobject,39      genprocid)40      SELECT41        x.uid,42        NULL,43        @GenProcID44      FROM(45      SELECT b.uid_org AS uid46      FROM BaseTree b47      JOIN inserted i48        ON b.uid_accproduct = i.uid_accproduct49      UNION50      SELECT b.uid_org AS uid51      FROM BaseTree b52      JOIN deleted i53        ON b.uid_accproduct = i.uid_accproduct) AS x54      EXEC QBM_PDBQueueInsert_Bulk 'QER-K-ShoppingRackProductNode',55        @DBQueueElements_0156    END57    IF58    UPDATE(UID_AccProductGroup)59    BEGIN60      DECLARE @DBQueueElements_02 QBM_YDBQueueRaw61      INSERT INTO @DBQueueElements_02(object,62      subobject,63      genprocid)64      SELECT65        x.uid,66        NULL,67        @GenProcID68      FROM(69      SELECT b.uid_org AS uid70      FROM BaseTree b71      JOIN inserted i72        ON b.uid_accproduct = i.uid_accproduct) AS x73      EXEC QBM_PDBQueueInsert_Bulk 'QER-K-ShoppingRackProductNode',74        @DBQueueElements_0275    END76  END TRY77  BEGIN CATCH78    EXEC QBM_PSessionErrorAdd DEFAULT79    RAISERROR('',80    18,81    1)82      WITH NOWAIT83  END CATCH84  RETURN85END
Open raw exported source
SQL ยท Raw11 lines
1    create   trigger QER_TUAccProduct on AccProduct  for UPDATE not for Replication as begin  BEGIN TRY if exists (select top 1 1 from inserted)2 goto start if exists (select top 1 1 from deleted) goto start return start: declare @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext3('') if update(UID_OrgRuler) begin declare @RecalcParameter_01 QBM_YCursorBuffer insert into @RecalcParameter_01 (UID1, ObjectKey1, Ident1) select 'QER-PWODecisionRule-OA'4, i.XObjectKey, 'I' from inserted i exec QER_PITShopHelperFill_Recalc @RecalcParameter_01, @GenprocID end if update(UID_PWODecisionMethod) begin declare5 @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select b.uid_org6 as uid from BaseTree b join inserted i on b.uid_accproduct = i.uid_accproduct union select b.uid_org as uid from BaseTree b join deleted i on b.uid_accproduct7 = i.uid_accproduct ) as x exec QBM_PDBQueueInsert_Bulk 'QER-K-ShoppingRackProductNode', @DBQueueElements_01 end if update(UID_AccProductGroup) begin declare8 @DBQueueElements_02 QBM_YDBQueueRaw insert into @DBQueueElements_02 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select b.uid_org9 as uid from BaseTree b join inserted i on b.uid_accproduct = i.uid_accproduct ) as x exec QBM_PDBQueueInsert_Bulk 'QER-K-ShoppingRackProductNode', @DBQueueElements_0210 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH  return end 11