Back to OIM Explorer

dbo.ATT_TDBaseTree

Database TriggerSQL_TRIGGERSandbox DB

Database Trigger on BaseTree. Bulk DBQueue insert -> ATT-K-AttestationHelper-Cfg / ATT_ZAttestationHelperFill_Cfg at line 5; References QBM_PDBQueueInsert_Bulk; Trigger parent table: BaseTree

Source: sandbox-db sys.sql_modules

Source size: 847 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 -> ATT-K-AttestationHelper-Cfg / ATT_ZAttestationHelperFill_Cfg at line 5
  • References QBM_PDBQueueInsert_Bulk
  • Trigger parent table: BaseTree

Typed Edges

  • queues DBQueue task ATT_ZAttestationHelperFill_Cfg at line 5 Bulk DBQueue insert -> ATT-K-AttestationHelper-Cfg / ATT_ZAttestationHelperFill_Cfg at line 5
  • trigger on table BaseTree Trigger parent table: BaseTree
  • 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

SQL42 lines
1CREATE trigger ATT_TDBaseTree2  ON BaseTree FOR3DELETE NOT FOR Replication4AS5BEGIN6  BEGIN TRY7    IF EXISTS(8      SELECT TOP 1 19      FROM deleted)10    GOTO start11    RETURN start:12    DECLARE @GenProcID varchar(38)13    SELECT @GenProcID = dbo.QBM_FGISessionContext('')14    DECLARE @DBQueueElements_01 QBM_YDBQueueRaw15    INSERT INTO @DBQueueElements_01(object,16    subobject,17    genprocid)18    SELECT19      x.uid,20      NULL,21      @GenProcID22    FROM(23    SELECT24      DISTINCT ac.uid_AttestationCase AS uid25    FROM AttestationCase ac26    JOIN deleted d27      ON ac.ObjectKeyBase = d.XObjectKey OR ac.ObjectKey1 = d.XObjectKey OR ac.ObjectKey2 = d.XObjectKey OR ac.ObjectKey3 = d.XObjectKey28    WHERE29      ac.isclosed = 0) AS x30    EXEC QBM_PDBQueueInsert_Bulk 'ATT-K-AttestationHelper-Cfg',31      @DBQueueElements_0132  END TRY33  BEGIN CATCH34    EXEC QBM_PSessionErrorAdd DEFAULT35    RAISERROR('',36    18,37    1)38      WITH NOWAIT39  END CATCH40  ende:41  RETURN42END
Open raw exported source
SQL ยท Raw7 lines
1     create   trigger ATT_TDBaseTree on BaseTree  for Delete not for Replication as begin  BEGIN TRY if exists (select top 1 1 from deleted) goto2 start return start: declare @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext('')  declare @DBQueueElements_01 QBM_YDBQueueRaw insert3 into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select distinct ac.uid_AttestationCase as uid from AttestationCase4 ac join deleted d on ac.ObjectKeyBase = d.XObjectKey or ac.ObjectKey1 = d.XObjectKey or ac.ObjectKey2 = d.XObjectKey or ac.ObjectKey3 = d.XObjectKey where5 ac.isclosed = 0 ) as x  exec QBM_PDBQueueInsert_Bulk 'ATT-K-AttestationHelper-Cfg', @DBQueueElements_01  END TRY BEGIN CATCH exec QBM_PSessionErrorAdd6 default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 7