dbo.TSB_TIUNSGroupB1InUNSGroupB1

SQL_TRIGGER parent UNSGroupB1InUNSGroupB1

Created 2025-06-27T18:01:21.803 · modified 2026-04-14T23:23:08.883 · source: live DB sys.objects/sys.sql_expression_dependencies.

Open formatted source/search result

Parameters

NameTypeOutput
No parameters.

Referenced objects

SchemaObjectColumn/minorClass
DPRNameSpaceOBJECT_OR_COLUMN
insertedOBJECT_OR_COLUMN
QBM_PDBQueueInsert_BulkOBJECT_OR_COLUMN
QBM_PSessionErrorAddOBJECT_OR_COLUMN
QBM_YDBQueueRawTYPE
UNSGroupB1OBJECT_OR_COLUMN
UNSGroupB1collectionOBJECT_OR_COLUMN
UNSRootBOBJECT_OR_COLUMN
dboQBM_FGISessionContextOBJECT_OR_COLUMN

Source excerpt

First extracted SQL definition lines from the exported source. Use the full source page for complete context.

Open full formatted source

1  create   trigger TSB_TIUNSGroupB1InUNSGroupB1 on UNSGroupB1InUNSGroupB1  for Insert not for Replication as begin  if exists (select top
2 1 1 from inserted) goto start return start: BEGIN TRY  if exists (select top 1 1 from inserted i join UNSGroupB1 g on i.UID_UNSGroupB1Child = g.UID_UNSGroupB1
3 join UNSGroupB1 u on i.UID_UNSGroupB1Parent = u.UID_UNSGroupB1 join UNSRootB ru on u.UID_UNSRootB = ru.UID_UNSRootB join DPRNameSpace ns on ru.UID_DPRNameSpace
4 = ns.UID_DPRNameSpace join UNSRootB rg on g.UID_UNSRootB = rg.UID_UNSRootB where 0 = case when u.UID_UNSRootB = g.UID_UNSRootB then 1  when ns.IsExtendedInheritance
5 = 0 then 0 when ns.IsExtendedInheritance = 1 and ns.UID_DPRNameSpace = rg.UID_DPRNameSpace then 1 else 0 end ) begin raiserror ('#LDS#Assignment is not permitted due to the configuration of related UNSRoots.|'
6, 18, 2) with nowait end  declare @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext('') declare @DBQueueElements_01 QBM_YDBQueueRaw 
7insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select uid_UNSGroupB1Parent as uid from inserted
8 union select UID_UNSGroupB1Child from inserted union  select co.uid_UNSGroupB1Parent as uid from inserted i join UNSGroupB1collection co on i.UID_UNSGroupB1Child
9 = co.UID_UNSGroupB1Child  union select co.uid_UNSGroupB1Parent from inserted i join UNSGroupB1collection co on i.UID_UNSGroupB1Parent = co.UID_UNSGroupB1Child
10  union select co.UID_UNSGroupB1Child from inserted i join UNSGroupB1collection co on i.UID_UNSGroupB1Child = co.UID_UNSGroupB1Parent  union select
11 co.UID_UNSGroupB1Child from inserted i join UNSGroupB1collection co on i.UID_UNSGroupB1Parent = co.UID_UNSGroupB1Parent ) as x exec QBM_PDBQueueInsert_Bulk
12 'TSB-K-UNSGroupB1InUNSGroupB1', @DBQueueElements_01 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH
13 ende: return end 
14

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.883

inserts DBQueue tasks uses session context values has TRY/CATCH error handling

Summary: calls QBM_PDBQueueInsert_Bulk, QBM_PSessionErrorAdd; writes INSERT not, INSERT into; reads/joins inserted, UNSGroupB1, UNSRootB, DPRNameSpace, UNSGroupB1collection

Declared parameters

No declared parameters in sys.parameters for this object, or metadata was not available.

DML targets

INSERT not INSERT into

Config/session

Config: None extracted.

Session: None extracted.

DBQueue/tasks

TSB-K-UNSGroupB1InUNSGroupB1

Temp tables / referenced variables

Temp: #LDS #Assignment

Variables: @GenProcID @DBQueueElements_01

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.