dbo.QBM_ZTaskForInactiveTrigger
Stored ProcedureSQL_STORED_PROCEDURESandbox DB
Interpretation
- Database routine. Review parameters, called procedures, DBQueue inserts, and QBM_PJobCreate helper calls before assuming side effects.
- DBQueue relation detected. Follow the task procedure and referenced-by list for async processing.
Relations
- Single DBQueue insert -> QBM-K-CommonRecalculate / QBM_ZRecalculate at line 7
- References QBM_PDBQueueInsert_Single
Typed Edges
- queues DBQueue task QBM_ZRecalculate at line 7 Single DBQueue insert -> QBM-K-CommonRecalculate / QBM_ZRecalculate at line 7
- references source dbo.QBM_FCVStringToList source text reference
- references source dbo.QBM_FCVStringToListSQLMorphem source text reference
- references source dbo.QBM_FCVStringToListSQLMorphem0 source text reference
- references source dbo.QBM_PDBQueueInsert_Single source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
- references source dbo.QBM_TUIndicator474488 source text reference
- queues DBQueue task QBM-K-CommonRecalculate -> QBM_ZRecalculate QBM_PDBQueueInsert_Single 'QBM-K-CommonRecalculate', @UID_Task, '', @GenProcID select @ElementIndex += 1 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH end
References
- dbo.QBM_FCVStringToList
- dbo.QBM_FCVStringToListSQLMorphem
- dbo.QBM_FCVStringToListSQLMorphem0
- dbo.QBM_PDBQueueInsert_Single
- dbo.QBM_PSessionErrorAdd
- dbo.QBM_TUIndicator474488
Referenced By
- No direct source references extracted.
Complete Source
1CREATE PROCEDURE QBM_ZTaskForInactiveTrigger(2 @SlotNumberDummy int,3 @Triggername varchar(38),4 @Dummy2 varchar(38),5 @GenProcID varchar(38)6)7AS8BEGIN9 DECLARE @UID_Task varchar(38)10 DECLARE @ElementBuffer QBM_YCursorBuffer11 DECLARE @ElementCount int12 DECLARE @ElementIndex int13 BEGIN TRY14 INSERT INTO @ElementBuffer(UID1)15 SELECT16 DISTINCT ta.UID_Task17 FROM sys.triggers tr18 JOIN sys.sql_modules q19 ON q.object_id = tr.object_id CROSS apply dbo.QBM_FCVStringToListSQLMorphem0(q.definition,20 0,21 0) mo22 JOIN QBMDBQueueTask ta23 ON '''' + ta.UID_Task + '''' = mo.Morphem AND ta.QueryForRecalculate > ' '24 WHERE25 tr.name = @Triggername AND mo.MorphemType = 'Literal' AND mo.MorphemSubType = 'String' AND ta.UID_Task > ' ' AND tr.name != 'QBM_TUIndicator474488'26 SELECT @ElementCount = @@ROWCOUNT27 SELECT @ElementIndex = 128 WHILE @ElementIndex <= @ElementCount29 BEGIN30 SELECT TOP 1 @UID_Task = bu.UID131 FROM @ElementBuffer bu32 WHERE33 bu.ElementIndex = @ElementIndex34 EXEC QBM_PDBQueueInsert_Single 'QBM-K-CommonRecalculate',35 @UID_Task,36 '',37 @GenProcID38 SELECT @ElementIndex += 139 END40 END TRY41 BEGIN CATCH42 EXEC QBM_PSessionErrorAdd DEFAULT43 RAISERROR('',44 18,45 1)46 WITH NOWAIT47 END CATCH48END
Open raw exported source
1 create procedure QBM_ZTaskForInactiveTrigger (@SlotNumberDummy int , @Triggername varchar(38) , @Dummy2 varchar(38) , @GenProcID varchar2(38) ) as begin declare @UID_Task varchar(38) declare @ElementBuffer QBM_YCursorBuffer declare @ElementCount int declare @ElementIndex int BEGIN TRY insert3 into @ElementBuffer (UID1) select distinct ta.UID_Task from sys.triggers tr join sys.sql_modules q on q.object_id = tr.object_id cross apply dbo.QBM_FCVStringToListSQLMorphem04(q.definition, 0, 0) mo join QBMDBQueueTask ta on '''' + ta.UID_Task + '''' = mo.Morphem and ta.QueryForRecalculate > ' ' where tr.name = @Triggername 5and mo.MorphemType = 'Literal' and mo.MorphemSubType = 'String' and ta.UID_Task > ' ' and tr.name != 'QBM_TUIndicator474488' select @ElementCount = @@ROWCOUNT6 select @ElementIndex = 1 while @ElementIndex <= @ElementCount begin select top 1 @UID_Task = bu.UID1 from @ElementBuffer bu where bu.ElementIndex = @ElementIndex7 exec QBM_PDBQueueInsert_Single 'QBM-K-CommonRecalculate', @UID_Task, '', @GenProcID select @ElementIndex += 1 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd8 default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH end 9