dbo.QBM_TUQBMDBPrincipal
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 -> QBM-K-DBPrincipalCreate / QBM_ZDBPrincipalCreate at line 4
- References QBM_PDBQueueInsert_Bulk
- Trigger parent table: QBMDBPrincipal
Typed Edges
- queues DBQueue task QBM_ZDBPrincipalCreate at line 4 Bulk DBQueue insert -> QBM-K-DBPrincipalCreate / QBM_ZDBPrincipalCreate at line 4
- trigger on table QBMDBPrincipal Trigger parent table: QBMDBPrincipal
- 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 QBM_TUQBMDBPrincipal2 ON QBMDBPrincipal FOR3UPDATE NOT FOR Replication4AS5BEGIN6 BEGIN TRY7 IF EXISTS(8 SELECT TOP 1 19 FROM inserted)10 GOTO start11 IF EXISTS(12 SELECT TOP 1 113 FROM deleted)14 GOTO start15 RETURN start:16 DECLARE @GenProcID varchar(38)17 SELECT @GenProcID = dbo.QBM_FGISessionContext('')18 IF19 UPDATE(LoginName)20 BEGIN21 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw22 INSERT INTO @DBQueueElements_01(object,23 subobject,24 genprocid)25 SELECT26 x.uid,27 NULL,28 @GenProcID29 FROM(30 SELECT UID_QBMDBPrincipal AS uid31 FROM inserted) AS x32 EXEC QBM_PDBQueueInsert_Bulk 'QBM-K-DBPrincipalCreate',33 @DBQueueElements_0134 END35 END TRY36 BEGIN CATCH37 EXEC QBM_PSessionErrorAdd DEFAULT38 RAISERROR('',39 18,40 1)41 WITH NOWAIT42 END CATCH43END
Open raw exported source
1 create trigger QBM_TUQBMDBPrincipal on QBMDBPrincipal for Update not for Replication as begin BEGIN TRY if exists (select top 1 1 from inserted2) goto start if exists (select top 1 1 from deleted) goto start return start: declare @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext3('') if update(LoginName) begin declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid4, null, @GenProcID from ( select UID_QBMDBPrincipal as uid from inserted ) as x exec QBM_PDBQueueInsert_Bulk 'QBM-K-DBPrincipalCreate', @DBQueueElements_015 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH end 6