dbo.ADS_TUDomain
SQL_TRIGGER parent ADSDomain
Created 2025-06-27T18:01:23.420 · modified 2026-04-14T23:23:07.887 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
| No parameters. | ||
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| ADSAccount | OBJECT_OR_COLUMN | ||
| ADSAccountInADSGroup | OBJECT_OR_COLUMN | ||
| ADSDomain | OBJECT_OR_COLUMN | ||
| ADSGroup | OBJECT_OR_COLUMN | ||
| 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 | ||
| 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 ADS_TUDomain on adsdomain for Update not for Replication as begin BEGIN TRY if exists (select top 1 1 from inserted) goto start 2 if exists (select top 1 1 from deleted) goto start return start: declare @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext('') declare 3 @errno int declare @errmsg nvarchar(255) declare @Parameter nvarchar(1000) if update(uid_AERoleOwner) begin declare @RecalcParameter_01 QBM_YCursorBuffer 4 insert into @RecalcParameter_01 (UID1, ObjectKey1, Ident1) select 'TSB-PWODecisionRule-TO', i.XObjectKey, 'I' from inserted i union all select 'QER-PWODecisionRule-OX' 5, i.XObjectKey, 'I' from inserted i exec QER_PITShopHelperFill_Recalc @RecalcParameter_01, @GenprocID end if update(uid_AERoleOwner) begin declare @DBQueueElements_02 6 QBM_YDBQueueRaw insert into @DBQueueElements_02 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select d.UID_ADSDomain as uid from 7 deleted d ) as x exec QBM_PDBQueueInsert_Bulk 'ADS-K-BaseTreeOwnsObject', @DBQueueElements_02 end if update(UID_ADSForest) begin if exists 8(select top 1 1 from ADSDomain neu join deleted alt on neu.UID_ADSDomain = alt.UID_ADSDomain and isnull(alt.UID_ADSForest,'') <> isnull(neu.UID_ADSForest 9,'') ) begin declare @DBQueueElements_03 QBM_YDBQueueRaw insert into @DBQueueElements_03 (object, subobject, genprocid) select x.uid, null, @GenProcID 10 from ( select a.UID_ADSAccount as uid from ADSDomain n join deleted d on n.UID_ADSDomain = d.UID_ADSDomain and isnull(d.UID_ADSForest,'') <> isnull(n.UID_ADSForest 11,'') join ADSAccount a on a.UID_ADSDomain = n.UID_ADSDomain join ADSAccountInADSGroup uig on a.UID_ADSAccount = uig.UID_ADSAccount and uig.XOrigin > 0 12 join ADSGroup g on uig.UID_ADSGroup = g.UID_ADSGroup and g.UID_ADSDomain <> n.UID_ADSDomain union select a.UID_ADSAccount as uid from ADSDomain n join 13 deleted d on n.UID_ADSDomain = d.UID_ADSDomain and isnull(d.UID_ADSForest,'') <> isnull(n.UID_ADSForest,'') join ADSGroup g on g.UID_ADSDomain = n.UID_ADSDomain 14 join ADSAccountInADSGroup uig on uig.UID_ADSGroup = g.UID_ADSGroup and uig.XOrigin > 0 join ADSAccount a on a.UID_ADSAccount = uig.UID_ADSAccount and 15 a.UID_ADSDomain <> n.UID_ADSDomain ) as x exec QBM_PDBQueueInsert_Bulk 'ADS-K-ADSAccountInADSGroup', @DBQueueElements_03 end end END TRY BEGIN CATCH 16exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 17
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:07.887
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, ADSDomain, ADSAccount, ADSAccountInADSGroup…
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
Config/session
Config: None extracted.
Session: None extracted.
DBQueue/tasks
ADS-K-BaseTreeOwnsObject ADS-K-ADSAccountInADSGroupTemp tables / referenced variables
Temp: None extracted.
Variables: @GenProcID @errno @errmsg @Parameter @RecalcParameter_01 @GenprocID @DBQueueElements_02 @DBQueueElements_03
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.