dbo.TSB_TUUNSRootB
SQL_TRIGGER parent UNSRootB
Created 2025-06-27T18:01:21.140 · modified 2026-04-14T23:23:08.927 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
| No parameters. | ||
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| deleted | OBJECT_OR_COLUMN | ||
| inserted | OBJECT_OR_COLUMN | ||
| QBM_PDBQueueInsert_Bulk | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_YCursorBuffer | TYPE | ||
| QBM_YDBQueueRaw | TYPE | ||
| QER_PITShopHelperFill_Recalc | OBJECT_OR_COLUMN | ||
| UNSAccountB | OBJECT_OR_COLUMN | ||
| UNSAccountBHasUNSGroupB | OBJECT_OR_COLUMN | ||
| UNSAccountBHasUNSGroupB1 | OBJECT_OR_COLUMN | ||
| UNSAccountBHasUNSGroupB2 | OBJECT_OR_COLUMN | ||
| UNSAccountBHasUNSGroupB3 | OBJECT_OR_COLUMN | ||
| UNSAccountBInUNSGroupB | OBJECT_OR_COLUMN | ||
| UNSAccountBInUNSGroupB1 | OBJECT_OR_COLUMN | ||
| UNSAccountBInUNSGroupB2 | OBJECT_OR_COLUMN | ||
| UNSAccountBInUNSGroupB3 | OBJECT_OR_COLUMN | ||
| UNSGroupB | OBJECT_OR_COLUMN | ||
| UNSGroupB1 | OBJECT_OR_COLUMN | ||
| UNSGroupB2 | OBJECT_OR_COLUMN | ||
| UNSGroupB3 | OBJECT_OR_COLUMN | ||
| UNSRootB | OBJECT_OR_COLUMN | ||
| dbo | QBM_FGISessionContext | OBJECT_OR_COLUMN |
Source excerpt
First extracted SQL definition lines from the exported source. Use the full source page for complete context.
1create trigger TSB_TUUNSRootB on UNSRootB for Update not for Replication as begin declare @Parameter nvarchar(1000) BEGIN TRY if exists (select 2 top 1 1 from inserted) goto start if exists (select top 1 1 from deleted) goto start return start: declare @GenProcID varchar(38) select @GenProcID = 3dbo.QBM_FGISessionContext('') if update(UserContainsGroupList) begin if (exists (select top 1 1 from deleted d join UNSRootB r on d.UID_UNSRootB = r.UID_UNSRootB 4 join UNSAccountB a on a.UID_UNSRootB = r.UID_UNSRootB join UNSGroupB g on a.UID_UNSRootB = r.UID_UNSRootB left outer join UNSAccountBInUNSGroupB uig on 5 a.UID_UNSAccountB = uig.UID_UNSAccountB and g.UID_UNSGroupB = uig.UID_UNSGroupB left outer join UNSAccountBHasUNSGroupB uhg on a.UID_UNSAccountB = uhg.UID_UNSAccountB 6 and g.UID_UNSGroupB = uhg.UID_UNSGroupB where d.UserContainsGroupList & 0x01 <> r.UserContainsGroupList & 0x01 and ( uig.UID_UNSAccountB > ' ' or uhg.UID_UNSAccountB 7 > ' ' ) ) ) or (exists (select top 1 1 from deleted d join UNSRootB r on d.UID_UNSRootB = r.UID_UNSRootB join UNSAccountB a on a.UID_UNSRootB = r.UID_UNSRootB 8 join UNSGroupB1 g on a.UID_UNSRootB = r.UID_UNSRootB left outer join UNSAccountBInUNSGroupB1 uig on a.UID_UNSAccountB = uig.UID_UNSAccountB and g.UID_UNSGroupB1 9 = uig.UID_UNSGroupB1 left outer join UNSAccountBHasUNSGroupB1 uhg on a.UID_UNSAccountB = uhg.UID_UNSAccountB and g.UID_UNSGroupB1 = uhg.UID_UNSGroupB1 10 where d.UserContainsGroupList & 0x02 <> r.UserContainsGroupList & 0x02 and ( uig.UID_UNSAccountB > ' ' or uhg.UID_UNSAccountB > ' ' ) ) ) or (exists (select 11 top 1 1 from deleted d join UNSRootB r on d.UID_UNSRootB = r.UID_UNSRootB join UNSAccountB a on a.UID_UNSRootB = r.UID_UNSRootB join UNSGroupB2 g on a.UID_UNSRootB 12 = r.UID_UNSRootB left outer join UNSAccountBInUNSGroupB2 uig on a.UID_UNSAccountB = uig.UID_UNSAccountB and g.UID_UNSGroupB2 = uig.UID_UNSGroupB2 left 13 outer join UNSAccountBHasUNSGroupB2 uhg on a.UID_UNSAccountB = uhg.UID_UNSAccountB and g.UID_UNSGroupB2 = uhg.UID_UNSGroupB2 where d.UserContainsGroupList 14 & 0x04 <> r.UserContainsGroupList & 0x04 and ( uig.UID_UNSAccountB > ' ' or uhg.UID_UNSAccountB > ' ' ) ) ) or (exists (select top 1 1 from deleted d 15join UNSRootB r on d.UID_UNSRootB = r.UID_UNSRootB join UNSAccountB a on a.UID_UNSRootB = r.UID_UNSRootB join UNSGroupB3 g on a.UID_UNSRootB = r.UID_UNSRootB 16 left outer join UNSAccountBInUNSGroupB3 uig on a.UID_UNSAccountB = uig.UID_UNSAccountB and g.UID_UNSGroupB3 = uig.UID_UNSGroupB3 left outer join UNSAccountBHasUNSGroupB3 17 uhg on a.UID_UNSAccountB = uhg.UID_UNSAccountB and g.UID_UNSGroupB3 = uhg.UID_UNSGroupB3 where d.UserContainsGroupList & 0x08 <> r.UserContainsGroupList 18 & 0x08 and ( uig.UID_UNSAccountB > ' ' or uhg.UID_UNSAccountB > ' ' ) ) ) begin raiserror('#LDS#Change of {0} not allowed because of existing data.|UserContainsGroupList|' 19, 18, 1) with nowait end end if update(GroupUsageMask) begin if ( (exists (select top 1 1 from deleted d join UNSRootB r on d.UID_UNSRootB = r.UID_UNSRootB 20 join UNSGroupB g on r.UID_UNSRootB = g.UID_UNSRootB where d.GroupUsageMask & 0x01 > 0 and r.GroupUsageMask & 0x01 = 0 ) ) or (exists (select top 1 1 from 21 deleted d join UNSRootB r on d.UID_UNSRootB = r.UID_UNSRootB join UNSGroupB1 g on r.UID_UNSRootB = g.UID_UNSRootB where d.GroupUsageMask & 0x02 > 0 and 22 r.GroupUsageMask & 0x02 = 0 ) ) or (exists (select top 1 1 from deleted d join UNSRootB r on d.UID_UNSRootB = r.UID_UNSRootB join UNSGroupB2 g on r.UID_UNSRootB 23 = g.UID_UNSRootB where d.GroupUsageMask & 0x04 > 0 and r.GroupUsageMask & 0x04 = 0 ) ) or (exists (select top 1 1 from deleted d join UNSRootB r on d.UID_UNSRootB 24 = r.UID_UNSRootB join UNSGroupB3 g on r.UID_UNSRootB = g.UID_UNSRootB where d.GroupUsageMask & 0x08 > 0 and r.GroupUsageMask & 0x08 = 0 ) ) ) begin raiserror 25('#LDS#Change of {0} not allowed because of existing data.|GroupUsageMask|', 18, 1) with nowait end end if update(uid_AERoleOwner) begin declare @RecalcParameter_01 26 QBM_YCursorBuffer insert into @RecalcParameter_01 (UID1, ObjectKey1, Ident1) select 'TSB-PWODecisionRule-TO', i.XObjectKey, 'I' from inserted i union 27all select 'QER-PWODecisionRule-OX', i.XObjectKey, 'I' from inserted i exec QER_PITShopHelperFill_Recalc @RecalcParameter_01, @GenprocID end if update 28(uid_AERoleOwner) begin declare @DBQueueElements_02 QBM_YDBQueueRaw insert into @DBQueueElements_02 (object, subobject, genprocid) select x.uid, null, 29@GenProcID from ( select d.UID_UNSRootB as uid from deleted d ) as x exec QBM_PDBQueueInsert_Bulk 'TSB-K-BaseTreeOwnsObject', @DBQueueElements_02 end END 30 TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 31
Module relation graph
Loading module relation graph…
Source-derived context
Generated from exported SQL module definitions plus read-only sandbox sys.objects/sys.parameters/sys.sql_expression_dependencies metadata. This is factual source evidence, not a semantic guess.
provenance: SQL definition export provenance: sandbox DB metadata modified: 2026-04-14T23:23:08.927
inserts DBQueue tasks uses session context values has TRY/CATCH error handling
Summary: calls QER_PITShopHelperFill_Recalc, QBM_PDBQueueInsert_Bulk, QBM_PSessionErrorAdd; writes INSERT into, UPDATE not; reads/joins inserted, deleted, UNSRootB, UNSAccountB, UNSGroupB…
Declared parameters
No declared parameters in sys.parameters for this object, or metadata was not available.
DML targets
INSERT into UPDATE notRead/join references
SQL dependency metadata
- deleted
- inserted
- QBM_PDBQueueInsert_Bulk
- QBM_PSessionErrorAdd
- QBM_YCursorBuffer
- QBM_YDBQueueRaw
- QER_PITShopHelperFill_Recalc
- UNSAccountB
- UNSAccountBHasUNSGroupB
- UNSAccountBHasUNSGroupB1
- UNSAccountBHasUNSGroupB2
- UNSAccountBHasUNSGroupB3
- UNSAccountBInUNSGroupB
- UNSAccountBInUNSGroupB1
- UNSAccountBInUNSGroupB2
- UNSAccountBInUNSGroupB3
- UNSGroupB
- UNSGroupB1
- UNSGroupB2
- UNSGroupB3
- UNSRootB
- dbo.QBM_FGISessionContext
Config/session
Config: None extracted.
Session: None extracted.
DBQueue/tasks
TSB-K-BaseTreeOwnsObjectTemp tables / referenced variables
Temp: #LDS #Change
Variables: @Parameter @GenProcID @RecalcParameter_01 @GenprocID @DBQueueElements_02
Referenced by / reverse dependencies
Generated from live DB metadata, FK rows, and exported SQL dependency/source extraction. This is factual linkage evidence, not inferred behavior.
No reverse dependencies extracted.