dbo.QBM_ZPrePropDashBoardDef
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
- Bulk DBQueue insert -> QBM-K-CommonPrepropTree / QBM_ZPrePropTree at line 14
- References QBM_PDBQueueInsert_Bulk
Typed Edges
- queues DBQueue task QBM_ZPrePropTree at line 14 Bulk DBQueue insert -> QBM-K-CommonPrepropTree / QBM_ZPrePropTree at line 14
- references source dbo.QBM_FGIPrepropConditionDeactiv source text reference
- references source dbo.QBM_FGISessionContext source text reference
- references source dbo.QBM_PDBQueueInsert_Bulk source text reference
- references source dbo.QBM_PDBQueueInsert_WaitForComp source text reference
- references source dbo.QBM_PSessionContextSet source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
- queues DBQueue task QBM-K-CommonPrepropTree -> QBM_ZPrePropTree QBM_PDBQueueInsert_Bulk 'QBM-K-CommonPrepropTree' , @DBQueueElements_01 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH endLabel: exec QBM_PSessionContextSet 'GenProcID', @GenProcID_R r…
References
- dbo.QBM_FGIPrepropConditionDeactiv
- dbo.QBM_FGISessionContext
- dbo.QBM_PDBQueueInsert_Bulk
- dbo.QBM_PDBQueueInsert_WaitForComp
- dbo.QBM_PSessionContextSet
- dbo.QBM_PSessionErrorAdd
Referenced By
- No direct source references extracted.
Complete Source
1CREATE PROCEDURE QBM_ZPrePropDashBoardDef(2 @SlotNumber int3)4AS5BEGIN6 DECLARE @GenProcID varchar(38)7 DECLARE @CountItems int8 DECLARE @GenProcID_R varchar(38) = dbo.QBM_FGISessionContext('')9 DECLARE @DBQueueCurrent QBM_YDBQueueCurrent10 BEGIN TRY11 INSERT INTO @DBQueueCurrent(UID_DialogDBQueue,12 UID_Parameter,13 UID_SubParameter,14 GenProcID)15 SELECT16 UID_DialogDBQueue,17 UID_Parameter,18 UID_SubParameter,19 GenProcID20 FROM QBMDBQueueCurrent cu21 WITH(readpast)22 WHERE23 cu.SlotNumber = @SlotNumber24 IF @@rowcount = 025 BEGIN26 GOTO EndLabel27 END28 SELECT @GenProcID = max(GenProcID)29 FROM @DBQueueCurrent30 WHERE31 GenProcID > ' '32 IF isnull(@Genprocid,33 '') = ''34 BEGIN35 SELECT @GenProcID = newid()36 END37 DECLARE @PrePropHelper QBM_YPrepropHelper38 INSERT INTO @PrePropHelper(uid_parameter,39 isDeactivatedPrior,40 IsDeactivated,41 GenProcID,42 PreProcessorCondition,43 IsDeactivatedOld)44 SELECT45 x.uid_parameter,46 0,47 0,48 x.GenProcID,49 isnull(o.PreProcessorCondition,50 N ''),51 o.isDeactivatedByPreProcessor52 FROM @DBQueueCurrent x53 JOIN DialogDashBoardDef o54 ON x.uid_parameter = o.uid_dialogDashBoardDef55 UPDATE @PrePropHelper56 SET IsDeactivated = dbo.QBM_FGIPrepropConditionDeactiv(h.PreProcessorCondition)57 FROM @PrePropHelper h58 WHERE59 h.PreProcessorCondition > ' ' AND h.IsDeactivated = 060 EXEC QBM_PSessionContextSet 'GenProcID',61 @GenProcID62 UPDATE DialogDashBoardDef63 SET IsDeactivatedByPreProcessor = x.isDeactivated,64 xdateupdated = GetUTCDate(),65 xuserupdated = 'DBScheduler'66 FROM DialogDashBoardDef r67 JOIN @PrePropHelper x68 ON r.UID_DialogDashBoardDef = x.uid_parameter69 WHERE70 r.IsDeactivatedByPreProcessor <> x.IsDeactivated71 SELECT @CountItems = @@rowcount72 IF @CountItems > 073 BEGIN74 EXEC QBM_PDBQueueInsert_WaitForComp 'DashBoardDef',75 @GenProcID76 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw77 INSERT INTO @DBQueueElements_01(object,78 subobject,79 genprocid)80 SELECT81 x.uid,82 NULL,83 @GenProcID84 FROM(85 SELECT86 DISTINCT t.UID_QBMTree AS UID,87 x.GenProcID88 FROM QBMTree t,89 @PrePropHelper x90 WHERE91 isnull(UID_QBMTreeParent, '') = '' AND x.IsDeactivated <> x.IsDeactivatedOld AND EXISTS(92 SELECT TOP 1 193 FROM QBMTree y94 WHERE95 y.uid_dialogDashBoardDef =x.uid_parameter)) AS x96 EXEC QBM_PDBQueueInsert_Bulk 'QBM-K-CommonPrepropTree',97 @DBQueueElements_0198 END99 END TRY100 BEGIN CATCH101 EXEC QBM_PSessionErrorAdd DEFAULT102 RAISERROR('',103 18,104 1)105 WITH NOWAIT106 END CATCH107 endLabel:108 EXEC QBM_PSessionContextSet 'GenProcID',109 @GenProcID_R110 RETURN111END
Open raw exported source
1 create procedure QBM_ZPrePropDashBoardDef (@SlotNumber int) as begin declare @GenProcID varchar(38) declare @CountItems int declare @GenProcID_R2 varchar(38) = dbo.QBM_FGISessionContext('') declare @DBQueueCurrent QBM_YDBQueueCurrent BEGIN TRY insert into @DBQueueCurrent(UID_DialogDBQueue, UID_Parameter3, UID_SubParameter, GenProcID) select UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID from QBMDBQueueCurrent cu with (readpast) where cu.SlotNumber4 = @SlotNumber if @@rowcount = 0 begin goto EndLabel end select @GenProcID = max(GenProcID) from @DBQueueCurrent where GenProcID > ' ' if isnull(@Genprocid5, '') = '' begin select @GenProcID = newid() end declare @PrePropHelper QBM_YPrepropHelper insert into @PrePropHelper (uid_parameter , isDeactivatedPrior6 , IsDeactivated , GenProcID , PreProcessorCondition, IsDeactivatedOld) select x.uid_parameter , 0 , 0 , x.GenProcID, isnull(o.PreProcessorCondition,7N''), o.isDeactivatedByPreProcessor from @DBQueueCurrent x join DialogDashBoardDef o on x.uid_parameter = o.uid_dialogDashBoardDef update @PrePropHelper8 set IsDeactivated = dbo.QBM_FGIPrepropConditionDeactiv(h.PreProcessorCondition) from @PrePropHelper h where h.PreProcessorCondition > ' ' and h.IsDeactivated9 = 0 exec QBM_PSessionContextSet 'GenProcID', @GenProcID update DialogDashBoardDef set IsDeactivatedByPreProcessor = x.isDeactivated, xdateupdated = GetUTCDate10(), xuserupdated = 'DBScheduler' from DialogDashBoardDef r join @PrePropHelper x on r.UID_DialogDashBoardDef = x.uid_parameter where r.IsDeactivatedByPreProcessor11 <> x.IsDeactivated select @CountItems = @@rowcount if @CountItems > 0 begin exec QBM_PDBQueueInsert_WaitForComp 'DashBoardDef', @GenProcID declare12 @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, @GenProcID from (select distinct13 t.UID_QBMTree as UID, x.GenProcID from QBMTree t, @PrePropHelper x where isnull(UID_QBMTreeParent,'') = '' and x.IsDeactivated <> x.IsDeactivatedOld 14 and exists (select top 1 1 from QBMTree y where y.uid_dialogDashBoardDef =x.uid_parameter) ) as x exec QBM_PDBQueueInsert_Bulk 'QBM-K-CommonPrepropTree'15, @DBQueueElements_01 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH endLabel: exec QBM_PSessionContextSet16 'GenProcID', @GenProcID_R return end 17