Back to OIM Explorer

dbo.LDP_TILDPMachineInLDAPGroup

Database TriggerSQL_TRIGGERSandbox DB

Database Trigger on LDPMachineInLDAPGroup. Bulk DBQueue insert -> LDP-K-LDPMachineInLDAPGroup / LDP_ZLDPMachineInLDAPGroup at line 10; References QBM_PDBQueueInsert_Bulk; Trigger parent table: LDPMachineInLDAPGroup

Source: sandbox-db sys.sql_modules

Source size: 1.757 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 -> LDP-K-LDPMachineInLDAPGroup / LDP_ZLDPMachineInLDAPGroup at line 10
  • References QBM_PDBQueueInsert_Bulk
  • Trigger parent table: LDPMachineInLDAPGroup

Typed Edges

  • queues DBQueue task LDP_ZLDPMachineInLDAPGroup at line 10 Bulk DBQueue insert -> LDP-K-LDPMachineInLDAPGroup / LDP_ZLDPMachineInLDAPGroup at line 10
  • trigger on table LDPMachineInLDAPGroup Trigger parent table: LDPMachineInLDAPGroup
  • references source dbo.QBM_FGIBitPatternXOrigin source text reference
  • references source dbo.QBM_FGISessionContext source text reference
  • references source dbo.QER_FGIITShopFlagCombineValid source text reference
  • references source dbo.QBM_PDBQueueInsert_Bulk source text reference
  • references source dbo.QBM_PSessionErrorAdd source text reference
  • references source dbo.LDP_TILDPMachine source text reference

Complete Source

SQL69 lines
1CREATE trigger LDP_TILDPMachineInLDAPGroup2  ON LDPMachineInLDAPGroup FOR3INSERT NOT FOR Replication4AS5BEGIN6  DECLARE @QBM_BitPatternXOrigin_Direct int = dbo.QBM_FGIBitPatternXOrigin('|Direct|',7  0)8  DECLARE @QBM_BitPatternXOrigin_Inherit_inv int = dbo.QBM_FGIBitPatternXOrigin('|Inherit|',9  1)10  BEGIN TRY11    IF EXISTS(12      SELECT TOP 1 113      FROM inserted)14    GOTO start15    RETURN start:16    DECLARE @GenProcID varchar(38) = dbo.QBM_FGISessionContext('')17    DECLARE @XUser nvarchar(64) = dbo.QBM_FGISessionContext('XUser')18    IF EXISTS(19      SELECT TOP 1 120      FROM inserted i21      JOIN LDAPGroup elem22        ON i.uid_LDAPGroup = elem.uid_LDAPGroup23      WHERE24        dbo.QER_FGIITShopFlagCombineValid(i.XObjectKey, NULL, NULL, elem.XObjectKey, elem.IsForITShop, elem.IsITShopOnly) = 0 AND i.XOrigin & @QBM_BitPatternXOrigin_Direct25    > 0 AND dbo.QBM_FGISessionContext('Fullsync') = '')26    BEGIN27      RAISERROR('#LDS#Assignment is not permitted due to the combination of IT Shop flags.|',28      18,29      2)30        WITH nowait31    END32    IF EXISTS(33      SELECT TOP 1 134      FROM inserted i35      JOIN LDAPGroup g36        ON i.uid_LDAPGroup = g.uid_LDAPGroup AND g.IsDynamicGroup = 1 AND dbo.QBM_FGISessionContext('Fullsync') = '')37    BEGIN38      RAISERROR('#LDS#Cannot add {0} because assignments for dynamic groups are not permitted.|LDPMachineInLDAPGroup|',39      18,40      2)41        WITH nowait42    END43    DECLARE @DBQueueElements_01 QBM_YDBQueueRaw44    INSERT INTO @DBQueueElements_01(object,45    subobject,46    genprocid)47    SELECT48      x.uid,49      NULL,50      @GenProcID51    FROM(52    SELECT53      DISTINCT i.UID_LDPMachine AS uid54    FROM inserted i55    WHERE56      i.XOrigin & @QBM_BitPatternXOrigin_Inherit_inv > 0) AS x57    EXEC QBM_PDBQueueInsert_Bulk 'LDP-K-LDPMachineInLDAPGroup',58      @DBQueueElements_0159  END TRY60  BEGIN CATCH61    EXEC QBM_PSessionErrorAdd DEFAULT62    RAISERROR('',63    18,64    1)65      WITH NOWAIT66  END CATCH67  ende:68  RETURN69END
Open raw exported source
SQL ยท Raw13 lines
1    create   trigger LDP_TILDPMachineInLDAPGroup on LDPMachineInLDAPGroup  for Insert not for Replication as begin  declare @QBM_BitPatternXOrigin_Direct2 int = dbo.QBM_FGIBitPatternXOrigin('|Direct|', 0) declare @QBM_BitPatternXOrigin_Inherit_inv int = dbo.QBM_FGIBitPatternXOrigin('|Inherit|', 1)  BEGIN3 TRY if exists (select top 1 1 from inserted) goto start return start: declare @GenProcID varchar(38) = dbo.QBM_FGISessionContext('') declare @XUser nvarchar4(64) = dbo.QBM_FGISessionContext('XUser')  if exists (select top 1 1 from inserted i   join LDAPGroup elem on i.uid_LDAPGroup = elem.uid_LDAPGroup where5 dbo.QER_FGIITShopFlagCombineValid(i.XObjectKey, null, null, elem.XObjectKey, elem.IsForITShop, elem.IsITShopOnly) = 0  and i.XOrigin & @QBM_BitPatternXOrigin_Direct6 > 0 and dbo.QBM_FGISessionContext ('Fullsync') = '' ) begin  raiserror ('#LDS#Assignment is not permitted due to the combination of IT Shop flags.|', 718, 2) with nowait end   if exists (select top 1 1 from inserted i join LDAPGroup g on i.uid_LDAPGroup = g.uid_LDAPGroup and g.IsDynamicGroup = 1 and dbo.QBM_FGISessionContext8 ('Fullsync') = '' ) begin  raiserror( '#LDS#Cannot add {0} because assignments for dynamic groups are not permitted.|LDPMachineInLDAPGroup|', 18, 2) with9 nowait end  declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, @GenProcID 10from ( select distinct i.UID_LDPMachine as uid from inserted i   where i.XOrigin & @QBM_BitPatternXOrigin_Inherit_inv > 0 ) as x exec QBM_PDBQueueInsert_Bulk11 'LDP-K-LDPMachineInLDAPGroup', @DBQueueElements_01 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende:12 return end 13