dbo.QBM_ZPrePropObject
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-CommonPrepropSheet / QBM_ZPrePropSheet at line 15
- Bulk DBQueue insert -> QBM-K-CommonPrepropTreeResult / QBM_ZPrePropTreeResult at line 15
- Bulk DBQueue insert -> QBM-K-CommonPrepropTreeResult / QBM_ZPrePropTreeResult at line 18
- References QBM_PDBQueueInsert_Bulk
Typed Edges
- queues DBQueue task QBM_ZPrePropSheet at line 15 Bulk DBQueue insert -> QBM-K-CommonPrepropSheet / QBM_ZPrePropSheet at line 15
- queues DBQueue task QBM_ZPrePropTreeResult at line 15 Bulk DBQueue insert -> QBM-K-CommonPrepropTreeResult / QBM_ZPrePropTreeResult at line 15
- queues DBQueue task QBM_ZPrePropTreeResult at line 18 Bulk DBQueue insert -> QBM-K-CommonPrepropTreeResult / QBM_ZPrePropTreeResult at line 18
- 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-CommonPrepropSheet -> QBM_ZPrePropSheet QBM_PDBQueueInsert_Bulk 'QBM-K-CommonPrepropSheet', @DBQueueElements_01 declare @DBQueueElements_02 QBM_YDBQueueRaw insert into @DBQueueElements_02 (object, subobject, genprocid) select x.uid, null, @GenProcID from (select distinct t.UID_Q…
- queues DBQueue task QBM-K-CommonPrepropTreeResult -> QBM_ZPrePropTreeResult QBM_PDBQueueInsert_Bulk 'QBM-K-CommonPrepropTreeResult', @DBQueueElements_02 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('' , 18, 1) WITH NOWAIT END CATCH endLabel: exec QBM_PSessionContextSet 'GenProcID', @GenProc…
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_ZPrePropObject(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 isnull(t.isDeactivatedByPreProcessor,47 0),48 isnull(t.isDeactivatedByPreProcessor,49 0),50 x.GenProcID,51 isnull(o.PreProcessorCondition,52 N ''),53 o.isDeactivatedByPreProcessor54 FROM @DBQueueCurrent x55 JOIN DialogObject o56 ON x.uid_parameter = o.uid_dialogObject57 JOIN dialogtable t58 ON o.UID_DialogTable = t.UID_DialogTable59 UPDATE @PrePropHelper60 SET IsDeactivated = dbo.QBM_FGIPrepropConditionDeactiv(h.PreProcessorCondition)61 FROM @PrePropHelper h62 WHERE63 h.PreProcessorCondition > ' ' AND h.IsDeactivated = 064 EXEC QBM_PSessionContextSet 'GenProcID',65 @GenProcID66 UPDATE DialogObject67 SET IsDeactivatedByPreProcessor = x.isDeactivated,68 xdateupdated = GetUTCDate(),69 xuserupdated = 'DBScheduler'70 FROM DialogObject r71 JOIN @PrePropHelper x72 ON r.UID_DialogObject = x.uid_parameter73 WHERE74 r.IsDeactivatedByPreProcessor <> x.IsDeactivated75 SELECT @CountItems = @@rowcount76 IF @CountItems > 077 BEGIN78 EXEC QBM_PDBQueueInsert_WaitForComp 'Object',79 @GenProcID80 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw81 INSERT INTO @DBQueueElements_01(object,82 subobject,83 genprocid)84 SELECT85 x.uid,86 NULL,87 @GenProcID88 FROM(89 SELECT90 DISTINCT s.UID_DialogSheet AS UID,91 x.GenProcID92 FROM DialogObjectHasSheet sho93 JOIN @PrePropHelper x94 ON sho.UID_DialogObject = x.uid_parameter AND x.IsDeactivated <> x.IsDeactivatedOld95 JOIN DialogSheet s96 ON sho.uid_DialogSheet = s.uid_dialogSheet) AS x97 EXEC QBM_PDBQueueInsert_Bulk 'QBM-K-CommonPrepropSheet',98 @DBQueueElements_0199 DECLARE @DBQueueElements_02 QBM_YDBQueueRaw100 INSERT INTO @DBQueueElements_02(object,101 subobject,102 genprocid)103 SELECT104 x.uid,105 NULL,106 @GenProcID107 FROM(108 SELECT109 DISTINCT t.UID_QBMTreeResult AS UID,110 x.GenProcID111 FROM QBMTreeResult t,112 @PrePropHelper x113 WHERE114 x.IsDeactivated <> x.IsDeactivatedOld AND EXISTS(115 SELECT TOP 1 1116 FROM QBMTreeResult y117 WHERE118 y.uid_dialogobject = x.uid_parameter)) AS x119 EXEC QBM_PDBQueueInsert_Bulk 'QBM-K-CommonPrepropTreeResult',120 @DBQueueElements_02121 END122 END TRY123 BEGIN CATCH124 EXEC QBM_PSessionErrorAdd DEFAULT125 RAISERROR('',126 18,127 1)128 WITH NOWAIT129 END CATCH130 endLabel:131 EXEC QBM_PSessionContextSet 'GenProcID',132 @GenProcID_R133 RETURN134END
Open raw exported source
1 create procedure QBM_ZPrePropObject (@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, isnull(t.isDeactivatedByPreProcessor,0), isnull(t.isDeactivatedByPreProcessor7,0), x.GenProcID, isnull(o.PreProcessorCondition,N''), o.isDeactivatedByPreProcessor from @DBQueueCurrent x join DialogObject o on x.uid_parameter = o.uid_dialogObject8 join dialogtable t on o.UID_DialogTable = t.UID_DialogTable update @PrePropHelper set IsDeactivated = dbo.QBM_FGIPrepropConditionDeactiv(h.PreProcessorCondition9) from @PrePropHelper h where h.PreProcessorCondition > ' ' and h.IsDeactivated = 0 exec QBM_PSessionContextSet 'GenProcID', @GenProcID update DialogObject10 set IsDeactivatedByPreProcessor = x.isDeactivated, xdateupdated = GetUTCDate(), xuserupdated = 'DBScheduler' from DialogObject r join @PrePropHelper 11x on r.UID_DialogObject = x.uid_parameter where r.IsDeactivatedByPreProcessor <> x.IsDeactivated select @CountItems = @@rowcount if @CountItems > 0 begin12 exec QBM_PDBQueueInsert_WaitForComp 'Object', @GenProcID declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject13, genprocid) select x.uid, null, @GenProcID from (select distinct s.UID_DialogSheet as UID, x.GenProcID from DialogObjectHasSheet sho join @PrePropHelper14 x on sho.UID_DialogObject = x.uid_parameter and x.IsDeactivated <> x.IsDeactivatedOld join DialogSheet s on sho.uid_DialogSheet = s.uid_dialogSheet ) 15as x exec QBM_PDBQueueInsert_Bulk 'QBM-K-CommonPrepropSheet', @DBQueueElements_01 declare @DBQueueElements_02 QBM_YDBQueueRaw insert into @DBQueueElements_0216 (object, subobject, genprocid) select x.uid, null, @GenProcID from (select distinct t.UID_QBMTreeResult as UID, x.GenProcID from QBMTreeResult t, @PrePropHelper17 x where x.IsDeactivated <> x.IsDeactivatedOld and exists (select top 1 1 from QBMTreeResult y where y.uid_dialogobject = x.uid_parameter) ) as x exec18 QBM_PDBQueueInsert_Bulk 'QBM-K-CommonPrepropTreeResult', @DBQueueElements_02 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR (''19, 18, 1) WITH NOWAIT END CATCH endLabel: exec QBM_PSessionContextSet 'GenProcID', @GenProcID_R return end 20