dbo.TSB_TUDPRNameSpace
Database TriggerSQL_TRIGGERSandbox DB
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 -> TSB-K-UNSAccountBInUNSGroupB / TSB_ZUNSAccountBInUNSGroupB at line 41
- Bulk DBQueue insert -> TSB-K-UNSAccountBInUNSGroupB1 / TSB_ZUNSAccountBInUNSGroupB1 at line 41
- Bulk DBQueue insert -> TSB-K-UNSAccountBInUNSGroupB2 / TSB_ZUNSAccountBInUNSGroupB2 at line 41
- Bulk DBQueue insert -> TSB-K-UNSAccountBInUNSGroupB3 / TSB_ZUNSAccountBInUNSGroupB3 at line 41
- Bulk DBQueue insert -> TSB-K-UNSAccountBHasUNSItemB / TSB_ZUNSAccountBHasUNSItemB at line 41
- Bulk DBQueue insert -> TSB-K-UNSGroupBHasUNSItemB / TSB_ZUNSGroupBHasUNSItemB at line 41
- Bulk DBQueue insert -> TSB-K-UNSAccountBInUNSGroupB1 / TSB_ZUNSAccountBInUNSGroupB1 at line 43
- Bulk DBQueue insert -> TSB-K-UNSAccountBInUNSGroupB2 / TSB_ZUNSAccountBInUNSGroupB2 at line 43
- Bulk DBQueue insert -> TSB-K-UNSAccountBInUNSGroupB3 / TSB_ZUNSAccountBInUNSGroupB3 at line 43
- Bulk DBQueue insert -> TSB-K-UNSAccountBHasUNSItemB / TSB_ZUNSAccountBHasUNSItemB at line 43
- Bulk DBQueue insert -> TSB-K-UNSGroupBHasUNSItemB / TSB_ZUNSGroupBHasUNSItemB at line 43
- Bulk DBQueue insert -> TSB-K-UNSAccountBInUNSGroupB2 / TSB_ZUNSAccountBInUNSGroupB2 at line 44
- Bulk DBQueue insert -> TSB-K-UNSAccountBInUNSGroupB3 / TSB_ZUNSAccountBInUNSGroupB3 at line 44
- Bulk DBQueue insert -> TSB-K-UNSAccountBHasUNSItemB / TSB_ZUNSAccountBHasUNSItemB at line 44
- Bulk DBQueue insert -> TSB-K-UNSGroupBHasUNSItemB / TSB_ZUNSGroupBHasUNSItemB at line 44
- Bulk DBQueue insert -> TSB-K-UNSAccountBInUNSGroupB3 / TSB_ZUNSAccountBInUNSGroupB3 at line 46
- Bulk DBQueue insert -> TSB-K-UNSAccountBHasUNSItemB / TSB_ZUNSAccountBHasUNSItemB at line 46
- Bulk DBQueue insert -> TSB-K-UNSGroupBHasUNSItemB / TSB_ZUNSGroupBHasUNSItemB at line 46
- Bulk DBQueue insert -> TSB-K-UNSAccountBHasUNSItemB / TSB_ZUNSAccountBHasUNSItemB at line 51
- Bulk DBQueue insert -> TSB-K-UNSGroupBHasUNSItemB / TSB_ZUNSGroupBHasUNSItemB at line 51
- Bulk DBQueue insert -> TSB-K-UNSGroupBHasUNSItemB / TSB_ZUNSGroupBHasUNSItemB at line 57
- References QBM_PDBQueueInsert_Bulk
- Trigger parent table: DPRNameSpace
Typed Edges
- queues DBQueue task TSB_ZUNSAccountBInUNSGroupB at line 41 Bulk DBQueue insert -> TSB-K-UNSAccountBInUNSGroupB / TSB_ZUNSAccountBInUNSGroupB at line 41
- queues DBQueue task TSB_ZUNSAccountBInUNSGroupB1 at line 41 Bulk DBQueue insert -> TSB-K-UNSAccountBInUNSGroupB1 / TSB_ZUNSAccountBInUNSGroupB1 at line 41
- queues DBQueue task TSB_ZUNSAccountBInUNSGroupB2 at line 41 Bulk DBQueue insert -> TSB-K-UNSAccountBInUNSGroupB2 / TSB_ZUNSAccountBInUNSGroupB2 at line 41
- queues DBQueue task TSB_ZUNSAccountBInUNSGroupB3 at line 41 Bulk DBQueue insert -> TSB-K-UNSAccountBInUNSGroupB3 / TSB_ZUNSAccountBInUNSGroupB3 at line 41
- queues DBQueue task TSB_ZUNSAccountBHasUNSItemB at line 41 Bulk DBQueue insert -> TSB-K-UNSAccountBHasUNSItemB / TSB_ZUNSAccountBHasUNSItemB at line 41
- queues DBQueue task TSB_ZUNSGroupBHasUNSItemB at line 41 Bulk DBQueue insert -> TSB-K-UNSGroupBHasUNSItemB / TSB_ZUNSGroupBHasUNSItemB at line 41
- queues DBQueue task TSB_ZUNSAccountBInUNSGroupB1 at line 43 Bulk DBQueue insert -> TSB-K-UNSAccountBInUNSGroupB1 / TSB_ZUNSAccountBInUNSGroupB1 at line 43
- queues DBQueue task TSB_ZUNSAccountBInUNSGroupB2 at line 43 Bulk DBQueue insert -> TSB-K-UNSAccountBInUNSGroupB2 / TSB_ZUNSAccountBInUNSGroupB2 at line 43
- queues DBQueue task TSB_ZUNSAccountBInUNSGroupB3 at line 43 Bulk DBQueue insert -> TSB-K-UNSAccountBInUNSGroupB3 / TSB_ZUNSAccountBInUNSGroupB3 at line 43
- queues DBQueue task TSB_ZUNSAccountBHasUNSItemB at line 43 Bulk DBQueue insert -> TSB-K-UNSAccountBHasUNSItemB / TSB_ZUNSAccountBHasUNSItemB at line 43
- queues DBQueue task TSB_ZUNSGroupBHasUNSItemB at line 43 Bulk DBQueue insert -> TSB-K-UNSGroupBHasUNSItemB / TSB_ZUNSGroupBHasUNSItemB at line 43
- queues DBQueue task TSB_ZUNSAccountBInUNSGroupB2 at line 44 Bulk DBQueue insert -> TSB-K-UNSAccountBInUNSGroupB2 / TSB_ZUNSAccountBInUNSGroupB2 at line 44
- queues DBQueue task TSB_ZUNSAccountBInUNSGroupB3 at line 44 Bulk DBQueue insert -> TSB-K-UNSAccountBInUNSGroupB3 / TSB_ZUNSAccountBInUNSGroupB3 at line 44
- queues DBQueue task TSB_ZUNSAccountBHasUNSItemB at line 44 Bulk DBQueue insert -> TSB-K-UNSAccountBHasUNSItemB / TSB_ZUNSAccountBHasUNSItemB at line 44
- queues DBQueue task TSB_ZUNSGroupBHasUNSItemB at line 44 Bulk DBQueue insert -> TSB-K-UNSGroupBHasUNSItemB / TSB_ZUNSGroupBHasUNSItemB at line 44
- queues DBQueue task TSB_ZUNSAccountBInUNSGroupB3 at line 46 Bulk DBQueue insert -> TSB-K-UNSAccountBInUNSGroupB3 / TSB_ZUNSAccountBInUNSGroupB3 at line 46
- queues DBQueue task TSB_ZUNSAccountBHasUNSItemB at line 46 Bulk DBQueue insert -> TSB-K-UNSAccountBHasUNSItemB / TSB_ZUNSAccountBHasUNSItemB at line 46
- queues DBQueue task TSB_ZUNSGroupBHasUNSItemB at line 46 Bulk DBQueue insert -> TSB-K-UNSGroupBHasUNSItemB / TSB_ZUNSGroupBHasUNSItemB at line 46
- queues DBQueue task TSB_ZUNSAccountBHasUNSItemB at line 51 Bulk DBQueue insert -> TSB-K-UNSAccountBHasUNSItemB / TSB_ZUNSAccountBHasUNSItemB at line 51
- queues DBQueue task TSB_ZUNSGroupBHasUNSItemB at line 51 Bulk DBQueue insert -> TSB-K-UNSGroupBHasUNSItemB / TSB_ZUNSGroupBHasUNSItemB at line 51
- queues DBQueue task TSB_ZUNSGroupBHasUNSItemB at line 57 Bulk DBQueue insert -> TSB-K-UNSGroupBHasUNSItemB / TSB_ZUNSGroupBHasUNSItemB at line 57
- trigger on table DPRNameSpace Trigger parent table: DPRNameSpace
- 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
1CREATE trigger TSB_TUDPRNameSpace2 ON DPRNameSpace FOR3UPDATE NOT FOR Replication4AS5BEGIN6 IF EXISTS(7 SELECT TOP 1 18 FROM inserted)9 GOTO start10 IF EXISTS(11 SELECT TOP 1 112 FROM deleted)13 GOTO start14 RETURN start:15 DECLARE @GenProcID varchar(38)16 BEGIN TRY17 SELECT @GenProcID = dbo.QBM_FGISessionContext('')18 IF NOT19 UPDATE(IsExtendedInheritance)20 BEGIN21 GOTO naechsterTest22 END23 DECLARE @AccountsFuerGroupB0 QBM_YParameterList24 DECLARE @AccountsFuerGroupB1 QBM_YParameterList25 DECLARE @AccountsFuerGroupB2 QBM_YParameterList26 DECLARE @AccountsFuerGroupB3 QBM_YParameterList27 DECLARE @DBQueueElements_GroupB0 QBM_YDBQueueRaw28 DECLARE @DBQueueElements_GroupB1 QBM_YDBQueueRaw29 DECLARE @DBQueueElements_GroupB2 QBM_YDBQueueRaw30 DECLARE @DBQueueElements_GroupB3 QBM_YDBQueueRaw31 INSERT INTO @AccountsFuerGroupB0(Parameter1)32 SELECT33 DISTINCT ac.UID_UNSAccountB34 FROM DPRNameSpace a35 JOIN deleted d36 ON a.UID_DPRNameSpace = d.UID_DPRNameSpace37 JOIN UNSRootB r38 ON r.UID_DPRNameSpace = a.UID_DPRNameSpace39 JOIN UNSRootB r240 ON r2.UID_DPRNameSpace = a.UID_DPRNameSpace AND r.UID_UNSRootB <> r2.UID_UNSRootB41 JOIN UNSAccountB ac42 ON r.UID_UNSRootB = ac.UID_UNSRootB43 WHERE44 isnull(d.IsExtendedInheritance,45 0) <> isnull(a.IsExtendedInheritance,46 0) AND r2.GroupUsageMask & 0x01 > 047 INSERT INTO @AccountsFuerGroupB1(Parameter1)48 SELECT49 DISTINCT ac.UID_UNSAccountB50 FROM DPRNameSpace a51 JOIN deleted d52 ON a.UID_DPRNameSpace = d.UID_DPRNameSpace53 JOIN UNSRootB r54 ON r.UID_DPRNameSpace = a.UID_DPRNameSpace55 JOIN UNSRootB r256 ON r2.UID_DPRNameSpace = a.UID_DPRNameSpace AND r.UID_UNSRootB <> r2.UID_UNSRootB57 JOIN UNSAccountB ac58 ON r.UID_UNSRootB = ac.UID_UNSRootB59 WHERE60 isnull(d.IsExtendedInheritance,61 0) <> isnull(a.IsExtendedInheritance,62 0) AND r2.GroupUsageMask & 0x02 > 063 INSERT INTO @AccountsFuerGroupB2(Parameter1)64 SELECT65 DISTINCT ac.UID_UNSAccountB66 FROM DPRNameSpace a67 JOIN deleted d68 ON a.UID_DPRNameSpace = d.UID_DPRNameSpace69 JOIN UNSRootB r70 ON r.UID_DPRNameSpace = a.UID_DPRNameSpace71 JOIN UNSRootB r272 ON r2.UID_DPRNameSpace = a.UID_DPRNameSpace AND r.UID_UNSRootB <> r2.UID_UNSRootB73 JOIN UNSAccountB ac74 ON r.UID_UNSRootB = ac.UID_UNSRootB75 WHERE76 isnull(d.IsExtendedInheritance,77 0) <> isnull(a.IsExtendedInheritance,78 0) AND r2.GroupUsageMask & 0x04 > 079 INSERT INTO @AccountsFuerGroupB3(Parameter1)80 SELECT81 DISTINCT ac.UID_UNSAccountB82 FROM DPRNameSpace a83 JOIN deleted d84 ON a.UID_DPRNameSpace = d.UID_DPRNameSpace85 JOIN UNSRootB r86 ON r.UID_DPRNameSpace = a.UID_DPRNameSpace87 JOIN UNSRootB r288 ON r2.UID_DPRNameSpace = a.UID_DPRNameSpace AND r.UID_UNSRootB <> r2.UID_UNSRootB89 JOIN UNSAccountB ac90 ON r.UID_UNSRootB = ac.UID_UNSRootB91 WHERE92 isnull(d.IsExtendedInheritance,93 0) <> isnull(a.IsExtendedInheritance,94 0) AND r2.GroupUsageMask & 0x08 > 095 INSERT INTO @AccountsFuerGroupB0(Parameter1)96 SELECT aig.UID_UNSAccountB AS uid97 FROM DPRNameSpace a98 JOIN deleted d99 ON a.UID_DPRNameSpace = d.UID_DPRNameSpace100 JOIN UNSRootB r101 ON r.UID_DPRNameSpace = a.UID_DPRNameSpace AND r.GroupUsageMask & 0x01 > 0102 JOIN UNSGroupB ac103 ON r.UID_UNSRootB = ac.UID_UNSRootB104 JOIN UNSAccountBInUNSGroupB aig105 ON ac.UID_UNSGroupB = aig.UID_UNSGroupB106 WHERE107 isnull(d.IsExtendedInheritance,108 0) <> isnull(a.IsExtendedInheritance,109 0)110 UNION111 SELECT aig.UID_UNSAccountB AS uid112 FROM DPRNameSpace a113 JOIN deleted d114 ON a.UID_DPRNameSpace = d.UID_DPRNameSpace115 JOIN UNSRootB r116 ON r.UID_DPRNameSpace = a.UID_DPRNameSpace AND r.GroupUsageMask & 0x01 > 0117 JOIN UNSGroupB ac118 ON r.UID_UNSRootB = ac.UID_UNSRootB119 JOIN UNSAccountBHasUNSGroupB aig120 ON ac.UID_UNSGroupB = aig.UID_UNSGroupB121 WHERE122 isnull(d.IsExtendedInheritance,123 0) <> isnull(a.IsExtendedInheritance,124 0)125 INSERT INTO @AccountsFuerGroupB1(Parameter1)126 SELECT aig.UID_UNSAccountB AS uid127 FROM DPRNameSpace a128 JOIN deleted d129 ON a.UID_DPRNameSpace = d.UID_DPRNameSpace130 JOIN UNSRootB r131 ON r.UID_DPRNameSpace = a.UID_DPRNameSpace AND r.GroupUsageMask & 0x02 > 0132 JOIN UNSGroupB1 ac133 ON r.UID_UNSRootB = ac.UID_UNSRootB134 JOIN UNSAccountBInUNSGroupB1 aig135 ON ac.UID_UNSGroupB1 = aig.UID_UNSGroupB1136 WHERE137 isnull(d.IsExtendedInheritance,138 0) <> isnull(a.IsExtendedInheritance,139 0)140 UNION141 SELECT aig.UID_UNSAccountB AS uid142 FROM DPRNameSpace a143 JOIN deleted d144 ON a.UID_DPRNameSpace = d.UID_DPRNameSpace145 JOIN UNSRootB r146 ON r.UID_DPRNameSpace = a.UID_DPRNameSpace AND r.GroupUsageMask & 0x02 > 0147 JOIN UNSGroupB1 ac148 ON r.UID_UNSRootB = ac.UID_UNSRootB149 JOIN UNSAccountBHasUNSGroupB1 aig150 ON ac.UID_UNSGroupB1 = aig.UID_UNSGroupB1151 WHERE152 isnull(d.IsExtendedInheritance,153 0) <> isnull(a.IsExtendedInheritance,154 0)155 INSERT INTO @AccountsFuerGroupB2(Parameter1)156 SELECT aig.UID_UNSAccountB AS uid157 FROM DPRNameSpace a158 JOIN deleted d159 ON a.UID_DPRNameSpace = d.UID_DPRNameSpace160 JOIN UNSRootB r161 ON r.UID_DPRNameSpace = a.UID_DPRNameSpace AND r.GroupUsageMask & 0x04 > 0162 JOIN UNSGroupB2 ac163 ON r.UID_UNSRootB = ac.UID_UNSRootB164 JOIN UNSAccountBInUNSGroupB2 aig165 ON ac.UID_UNSGroupB2 = aig.UID_UNSGroupB2166 WHERE167 isnull(d.IsExtendedInheritance,168 0) <> isnull(a.IsExtendedInheritance,169 0)170 UNION171 SELECT aig.UID_UNSAccountB AS uid172 FROM DPRNameSpace a173 JOIN deleted d174 ON a.UID_DPRNameSpace = d.UID_DPRNameSpace175 JOIN UNSRootB r176 ON r.UID_DPRNameSpace = a.UID_DPRNameSpace AND r.GroupUsageMask & 0x04 > 0177 JOIN UNSGroupB2 ac178 ON r.UID_UNSRootB = ac.UID_UNSRootB179 JOIN UNSAccountBHasUNSGroupB2 aig180 ON ac.UID_UNSGroupB2 = aig.UID_UNSGroupB2181 WHERE182 isnull(d.IsExtendedInheritance,183 0) <> isnull(a.IsExtendedInheritance,184 0)185 INSERT INTO @AccountsFuerGroupB3(Parameter1)186 SELECT aig.UID_UNSAccountB AS uid187 FROM DPRNameSpace a188 JOIN deleted d189 ON a.UID_DPRNameSpace = d.UID_DPRNameSpace190 JOIN UNSRootB r191 ON r.UID_DPRNameSpace = a.UID_DPRNameSpace AND r.GroupUsageMask & 0x08 > 0192 JOIN UNSGroupB3 ac193 ON r.UID_UNSRootB = ac.UID_UNSRootB194 JOIN UNSAccountBInUNSGroupB3 aig195 ON ac.UID_UNSGroupB3 = aig.UID_UNSGroupB3196 WHERE197 isnull(d.IsExtendedInheritance,198 0) <> isnull(a.IsExtendedInheritance,199 0)200 UNION201 SELECT aig.UID_UNSAccountB AS uid202 FROM DPRNameSpace a203 JOIN deleted d204 ON a.UID_DPRNameSpace = d.UID_DPRNameSpace205 JOIN UNSRootB r206 ON r.UID_DPRNameSpace = a.UID_DPRNameSpace AND r.GroupUsageMask & 0x08 > 0207 JOIN UNSGroupB3 ac208 ON r.UID_UNSRootB = ac.UID_UNSRootB209 JOIN UNSAccountBHasUNSGroupB3 aig210 ON ac.UID_UNSGroupB3 = aig.UID_UNSGroupB3211 WHERE212 isnull(d.IsExtendedInheritance,213 0) <> isnull(a.IsExtendedInheritance,214 0)215 INSERT INTO @DBQueueElements_GroupB0(object,216 subobject,217 genprocid)218 SELECT219 DISTINCT x.Parameter1,220 NULL,221 @GenProcID222 FROM @AccountsFuerGroupB0 x223 EXEC QBM_PDBQueueInsert_Bulk 'TSB-K-UNSAccountBInUNSGroupB',224 @DBQueueElements_GroupB0225 INSERT INTO @DBQueueElements_GroupB1(object,226 subobject,227 genprocid)228 SELECT229 DISTINCT x.Parameter1,230 NULL,231 @GenProcID232 FROM @AccountsFuerGroupB1 x233 EXEC QBM_PDBQueueInsert_Bulk 'TSB-K-UNSAccountBInUNSGroupB1',234 @DBQueueElements_GroupB1235 INSERT INTO @DBQueueElements_GroupB2(object,236 subobject,237 genprocid)238 SELECT239 DISTINCT x.Parameter1,240 NULL,241 @GenProcID242 FROM @AccountsFuerGroupB2 x243 EXEC QBM_PDBQueueInsert_Bulk 'TSB-K-UNSAccountBInUNSGroupB2',244 @DBQueueElements_GroupB2245 INSERT INTO @DBQueueElements_GroupB3(object,246 subobject,247 genprocid)248 SELECT249 DISTINCT x.Parameter1,250 NULL,251 @GenProcID252 FROM @AccountsFuerGroupB3 x253 EXEC QBM_PDBQueueInsert_Bulk 'TSB-K-UNSAccountBInUNSGroupB3',254 @DBQueueElements_GroupB3255 DECLARE @DBQueueElements_06 QBM_YDBQueueRaw256 INSERT INTO @DBQueueElements_06(object,257 subobject,258 genprocid)259 SELECT260 x.uid,261 NULL,262 @GenProcID263 FROM(264 SELECT ac.UID_UNSAccountB AS uid265 FROM DPRNameSpace a266 JOIN deleted d267 ON a.UID_DPRNameSpace = d.UID_DPRNameSpace268 JOIN UNSRootB r269 ON r.UID_DPRNameSpace = a.UID_DPRNameSpace270 JOIN UNSAccountB ac271 ON r.UID_UNSRootB = ac.UID_UNSRootB272 WHERE273 isnull(d.IsExtendedInheritance, 0) <> isnull(a.IsExtendedInheritance, 0)274 UNION275 SELECT aig.UID_UNSAccountB AS uid276 FROM DPRNameSpace a277 JOIN deleted d278 ON a.UID_DPRNameSpace = d.UID_DPRNameSpace279 JOIN UNSRootB r280 ON r.UID_DPRNameSpace = a.UID_DPRNameSpace281 JOIN UNSItemB ac282 ON r.UID_UNSRootB = ac.UID_UNSRootB283 JOIN UNSAccountBHasUNSItemB aig284 ON ac.UID_UNSItemB = aig.UID_UNSItemB285 WHERE286 isnull(d.IsExtendedInheritance, 0) <> isnull(a.IsExtendedInheritance, 0)) AS x287 EXEC QBM_PDBQueueInsert_Bulk 'TSB-K-UNSAccountBHasUNSItemB',288 @DBQueueElements_06289 DECLARE @DBQueueElements_07 QBM_YDBQueueRaw290 INSERT INTO @DBQueueElements_07(object,291 subobject,292 genprocid)293 SELECT294 x.uid,295 NULL,296 @GenProcID297 FROM(298 SELECT ac.UID_UNSGroupB AS uid299 FROM DPRNameSpace a300 JOIN deleted d301 ON a.UID_DPRNameSpace = d.UID_DPRNameSpace302 JOIN UNSRootB r303 ON r.UID_DPRNameSpace = a.UID_DPRNameSpace304 JOIN UNSGroupB ac305 ON r.UID_UNSRootB = ac.UID_UNSRootB306 WHERE307 isnull(d.IsExtendedInheritance, 0) <> isnull(a.IsExtendedInheritance, 0)308 UNION309 SELECT aig.UID_UNSGroupB AS uid310 FROM DPRNameSpace a311 JOIN deleted d312 ON a.UID_DPRNameSpace = d.UID_DPRNameSpace313 JOIN UNSRootB r314 ON r.UID_DPRNameSpace = a.UID_DPRNameSpace315 JOIN UNSItemB ac316 ON r.UID_UNSRootB = ac.UID_UNSRootB317 JOIN UNSGroupBHasUnsItemB aig318 ON ac.UID_UNSItemB = aig.UID_UNSItemB319 WHERE320 isnull(d.IsExtendedInheritance, 0) <> isnull(a.IsExtendedInheritance, 0)) AS x321 EXEC QBM_PDBQueueInsert_Bulk 'TSB-K-UNSGroupBHasUNSItemB',322 @DBQueueElements_07 naechsterTest:323 END TRY324 BEGIN CATCH325 EXEC QBM_PSessionErrorAdd DEFAULT326 RAISERROR('',327 18,328 1)329 WITH NOWAIT330 END CATCH331 RETURN332END
Open raw exported source
1 create trigger TSB_TUDPRNameSpace on DPRNameSpace for Update not for Replication as begin if exists (select top 1 1 from inserted) goto start2 if exists (select top 1 1 from deleted) goto start return start: declare @GenProcID varchar(38) BEGIN TRY select @GenProcID = dbo.QBM_FGISessionContext3('') if not update(IsExtendedInheritance) begin goto naechsterTest end declare @AccountsFuerGroupB0 QBM_YParameterList declare @AccountsFuerGroupB1 QBM_YParameterList4 declare @AccountsFuerGroupB2 QBM_YParameterList declare @AccountsFuerGroupB3 QBM_YParameterList declare @DBQueueElements_GroupB0 QBM_YDBQueueRaw declare5 @DBQueueElements_GroupB1 QBM_YDBQueueRaw declare @DBQueueElements_GroupB2 QBM_YDBQueueRaw declare @DBQueueElements_GroupB3 QBM_YDBQueueRaw insert into6 @AccountsFuerGroupB0(Parameter1) select distinct ac.UID_UNSAccountB from DPRNameSpace a join deleted d on a.UID_DPRNameSpace = d.UID_DPRNameSpace join7 UNSRootB r on r.UID_DPRNameSpace = a.UID_DPRNameSpace join UNSRootB r2 on r2.UID_DPRNameSpace = a.UID_DPRNameSpace and r.UID_UNSRootB <> r2.UID_UNSRootB8 join UNSAccountB ac on r.UID_UNSRootB = ac.UID_UNSRootB where isnull(d.IsExtendedInheritance,0) <> isnull(a.IsExtendedInheritance,0) and r2.GroupUsageMask9 & 0x01 > 0 insert into @AccountsFuerGroupB1(Parameter1) select distinct ac.UID_UNSAccountB from DPRNameSpace a join deleted d on a.UID_DPRNameSpace = 10d.UID_DPRNameSpace join UNSRootB r on r.UID_DPRNameSpace = a.UID_DPRNameSpace join UNSRootB r2 on r2.UID_DPRNameSpace = a.UID_DPRNameSpace and r.UID_UNSRootB11 <> r2.UID_UNSRootB join UNSAccountB ac on r.UID_UNSRootB = ac.UID_UNSRootB where isnull(d.IsExtendedInheritance,0) <> isnull(a.IsExtendedInheritance,012) and r2.GroupUsageMask & 0x02 > 0 insert into @AccountsFuerGroupB2(Parameter1) select distinct ac.UID_UNSAccountB from DPRNameSpace a join deleted d on13 a.UID_DPRNameSpace = d.UID_DPRNameSpace join UNSRootB r on r.UID_DPRNameSpace = a.UID_DPRNameSpace join UNSRootB r2 on r2.UID_DPRNameSpace = a.UID_DPRNameSpace14 and r.UID_UNSRootB <> r2.UID_UNSRootB join UNSAccountB ac on r.UID_UNSRootB = ac.UID_UNSRootB where isnull(d.IsExtendedInheritance,0) <> isnull(a.IsExtendedInheritance15,0) and r2.GroupUsageMask & 0x04 > 0 insert into @AccountsFuerGroupB3(Parameter1) select distinct ac.UID_UNSAccountB from DPRNameSpace a join deleted d16 on a.UID_DPRNameSpace = d.UID_DPRNameSpace join UNSRootB r on r.UID_DPRNameSpace = a.UID_DPRNameSpace join UNSRootB r2 on r2.UID_DPRNameSpace = a.UID_DPRNameSpace17 and r.UID_UNSRootB <> r2.UID_UNSRootB join UNSAccountB ac on r.UID_UNSRootB = ac.UID_UNSRootB where isnull(d.IsExtendedInheritance,0) <> isnull(a.IsExtendedInheritance18,0) and r2.GroupUsageMask & 0x08 > 0 insert into @AccountsFuerGroupB0(Parameter1) select aig.UID_UNSAccountB as uid from DPRNameSpace a join deleted 19d on a.UID_DPRNameSpace = d.UID_DPRNameSpace join UNSRootB r on r.UID_DPRNameSpace = a.UID_DPRNameSpace and r.GroupUsageMask & 0x01 > 0 join UNSGroupB 20ac on r.UID_UNSRootB = ac.UID_UNSRootB join UNSAccountBInUNSGroupB aig on ac.UID_UNSGroupB = aig.UID_UNSGroupB where isnull(d.IsExtendedInheritance,0) 21<> isnull(a.IsExtendedInheritance,0) union select aig.UID_UNSAccountB as uid from DPRNameSpace a join deleted d on a.UID_DPRNameSpace = d.UID_DPRNameSpace22 join UNSRootB r on r.UID_DPRNameSpace = a.UID_DPRNameSpace and r.GroupUsageMask & 0x01 > 0 join UNSGroupB ac on r.UID_UNSRootB = ac.UID_UNSRootB join 23UNSAccountBHasUNSGroupB aig on ac.UID_UNSGroupB = aig.UID_UNSGroupB where isnull(d.IsExtendedInheritance,0) <> isnull(a.IsExtendedInheritance,0) insert24 into @AccountsFuerGroupB1(Parameter1) select aig.UID_UNSAccountB as uid from DPRNameSpace a join deleted d on a.UID_DPRNameSpace = d.UID_DPRNameSpace25 join UNSRootB r on r.UID_DPRNameSpace = a.UID_DPRNameSpace and r.GroupUsageMask & 0x02 > 0 join UNSGroupB1 ac on r.UID_UNSRootB = ac.UID_UNSRootB join26 UNSAccountBInUNSGroupB1 aig on ac.UID_UNSGroupB1 = aig.UID_UNSGroupB1 where isnull(d.IsExtendedInheritance,0) <> isnull(a.IsExtendedInheritance,0) union27 select aig.UID_UNSAccountB as uid from DPRNameSpace a join deleted d on a.UID_DPRNameSpace = d.UID_DPRNameSpace join UNSRootB r on r.UID_DPRNameSpace28 = a.UID_DPRNameSpace and r.GroupUsageMask & 0x02 > 0 join UNSGroupB1 ac on r.UID_UNSRootB = ac.UID_UNSRootB join UNSAccountBHasUNSGroupB1 aig on ac.UID_UNSGroupB129 = aig.UID_UNSGroupB1 where isnull(d.IsExtendedInheritance,0) <> isnull(a.IsExtendedInheritance,0) insert into @AccountsFuerGroupB2(Parameter1) select30 aig.UID_UNSAccountB as uid from DPRNameSpace a join deleted d on a.UID_DPRNameSpace = d.UID_DPRNameSpace join UNSRootB r on r.UID_DPRNameSpace = a.UID_DPRNameSpace31 and r.GroupUsageMask & 0x04 > 0 join UNSGroupB2 ac on r.UID_UNSRootB = ac.UID_UNSRootB join UNSAccountBInUNSGroupB2 aig on ac.UID_UNSGroupB2 = aig.UID_UNSGroupB232 where isnull(d.IsExtendedInheritance,0) <> isnull(a.IsExtendedInheritance,0) union select aig.UID_UNSAccountB as uid from DPRNameSpace a join deleted33 d on a.UID_DPRNameSpace = d.UID_DPRNameSpace join UNSRootB r on r.UID_DPRNameSpace = a.UID_DPRNameSpace and r.GroupUsageMask & 0x04 > 0 join UNSGroupB234 ac on r.UID_UNSRootB = ac.UID_UNSRootB join UNSAccountBHasUNSGroupB2 aig on ac.UID_UNSGroupB2 = aig.UID_UNSGroupB2 where isnull(d.IsExtendedInheritance35,0) <> isnull(a.IsExtendedInheritance,0) insert into @AccountsFuerGroupB3(Parameter1) select aig.UID_UNSAccountB as uid from DPRNameSpace a join deleted36 d on a.UID_DPRNameSpace = d.UID_DPRNameSpace join UNSRootB r on r.UID_DPRNameSpace = a.UID_DPRNameSpace and r.GroupUsageMask & 0x08 > 0 join UNSGroupB337 ac on r.UID_UNSRootB = ac.UID_UNSRootB join UNSAccountBInUNSGroupB3 aig on ac.UID_UNSGroupB3 = aig.UID_UNSGroupB3 where isnull(d.IsExtendedInheritance38,0) <> isnull(a.IsExtendedInheritance,0) union select aig.UID_UNSAccountB as uid from DPRNameSpace a join deleted d on a.UID_DPRNameSpace = d.UID_DPRNameSpace39 join UNSRootB r on r.UID_DPRNameSpace = a.UID_DPRNameSpace and r.GroupUsageMask & 0x08 > 0 join UNSGroupB3 ac on r.UID_UNSRootB = ac.UID_UNSRootB join40 UNSAccountBHasUNSGroupB3 aig on ac.UID_UNSGroupB3 = aig.UID_UNSGroupB3 where isnull(d.IsExtendedInheritance,0) <> isnull(a.IsExtendedInheritance,0) 41insert into @DBQueueElements_GroupB0 (object, subobject, genprocid) select distinct x.Parameter1, null, @GenProcID from @AccountsFuerGroupB0 x exec QBM_PDBQueueInsert_Bulk42 'TSB-K-UNSAccountBInUNSGroupB', @DBQueueElements_GroupB0 insert into @DBQueueElements_GroupB1 (object, subobject, genprocid) select distinct x.Parameter143, null, @GenProcID from @AccountsFuerGroupB1 x exec QBM_PDBQueueInsert_Bulk 'TSB-K-UNSAccountBInUNSGroupB1', @DBQueueElements_GroupB1 insert into @DBQueueElements_GroupB244 (object, subobject, genprocid) select distinct x.Parameter1, null, @GenProcID from @AccountsFuerGroupB2 x exec QBM_PDBQueueInsert_Bulk 'TSB-K-UNSAccountBInUNSGroupB2'45, @DBQueueElements_GroupB2 insert into @DBQueueElements_GroupB3 (object, subobject, genprocid) select distinct x.Parameter1, null, @GenProcID from @AccountsFuerGroupB346 x exec QBM_PDBQueueInsert_Bulk 'TSB-K-UNSAccountBInUNSGroupB3', @DBQueueElements_GroupB3 declare @DBQueueElements_06 QBM_YDBQueueRaw insert into @DBQueueElements_0647 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select ac.UID_UNSAccountB as uid from DPRNameSpace a join deleted d on a.UID_DPRNameSpace48 = d.UID_DPRNameSpace join UNSRootB r on r.UID_DPRNameSpace = a.UID_DPRNameSpace join UNSAccountB ac on r.UID_UNSRootB = ac.UID_UNSRootB where isnull(d.IsExtendedInheritance49,0) <> isnull(a.IsExtendedInheritance,0) union select aig.UID_UNSAccountB as uid from DPRNameSpace a join deleted d on a.UID_DPRNameSpace = d.UID_DPRNameSpace50 join UNSRootB r on r.UID_DPRNameSpace = a.UID_DPRNameSpace join UNSItemB ac on r.UID_UNSRootB = ac.UID_UNSRootB join UNSAccountBHasUNSItemB aig on ac.UID_UNSItemB51 = aig.UID_UNSItemB where isnull(d.IsExtendedInheritance,0) <> isnull(a.IsExtendedInheritance,0) ) as x exec QBM_PDBQueueInsert_Bulk 'TSB-K-UNSAccountBHasUNSItemB'52, @DBQueueElements_06 declare @DBQueueElements_07 QBM_YDBQueueRaw insert into @DBQueueElements_07 (object, subobject, genprocid) select x.uid, null, @GenProcID53 from ( select ac.UID_UNSGroupB as uid from DPRNameSpace a join deleted d on a.UID_DPRNameSpace = d.UID_DPRNameSpace join UNSRootB r on r.UID_DPRNameSpace54 = a.UID_DPRNameSpace join UNSGroupB ac on r.UID_UNSRootB = ac.UID_UNSRootB where isnull(d.IsExtendedInheritance,0) <> isnull(a.IsExtendedInheritance,055) union select aig.UID_UNSGroupB as uid from DPRNameSpace a join deleted d on a.UID_DPRNameSpace = d.UID_DPRNameSpace join UNSRootB r on r.UID_DPRNameSpace56 = a.UID_DPRNameSpace join UNSItemB ac on r.UID_UNSRootB = ac.UID_UNSRootB join UNSGroupBHasUnsItemB aig on ac.UID_UNSItemB = aig.UID_UNSItemB where isnull57(d.IsExtendedInheritance,0) <> isnull(a.IsExtendedInheritance,0) ) as x exec QBM_PDBQueueInsert_Bulk 'TSB-K-UNSGroupBHasUNSItemB', @DBQueueElements_07 58 naechsterTest: END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH return end 59