dbo.QBM_PSlotResetWhileJobRun_L
SQL_STORED_PROCEDURE
Created 2025-06-27T17:57:37.523 · modified 2026-04-14T23:16:09.187 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
@DBQueueCurrent | QBM_YDBQueueCurrent | no |
@Procid | int | no |
@ObjectKeysToCheck | QBM_YParameterList | no |
@JobChainNameAddOn | nvarchar | no |
@CountParameterOfTask | int | no |
@SlotNumber | int | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| DialogConfigParm | OBJECT_OR_COLUMN | ||
| JobQueue | OBJECT_OR_COLUMN | ||
| QBM_PDBQCS_CurrentMoveSlot | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_YDBQCSCurrentToMove | TYPE | ||
| QBM_YDBQueueCurrent | TYPE | ||
| QBM_YParameterList | TYPE | ||
| QBMDBQueueTaskMetric | OBJECT_OR_COLUMN | ||
| QBMElementAffectedByJob | OBJECT_OR_COLUMN | ||
| dbo | QBM_FGIDBQueueSlotResetType | OBJECT_OR_COLUMN | |
| dbo | QBM_FGIJobCreateName | OBJECT_OR_COLUMN | |
| dbo | QBM_FGISessionErrorRethrow | OBJECT_OR_COLUMN | |
| dbo | QBM_PJournal | OBJECT_OR_COLUMN |
Source excerpt
First extracted SQL definition lines from the exported source. Use the full source page for complete context.
1 create procedure QBM_PSlotResetWhileJobRun_L (@DBQueueCurrent QBM_YDBQueueCurrent readonly , @Procid int , @ObjectKeysToCheck QBM_YParameterList 2 readonly , @JobChainNameAddOn nvarchar(256) = null , @CountParameterOfTask int = 1 , @SlotNumber int = 0 ) as begin declare @erg int = 0 declare 3 @msg nvarchar(1000) declare @DebugLevel varchar(1) = 'W' declare @SuppressCount int = 30 declare @UID_Task varchar(38) declare @Procedurename nvarchar 4(64) declare @Procedurename_Z nvarchar(64) declare @Jobchainname nvarchar(256) declare @SlotNumberSource int declare @SlotNumberTarget int declare @DBQueueToMove 5 QBM_YDBQCSCurrentToMove declare @RowsMoved int SET XACT_ABORT OFF BEGIN TRY if exists (select top 1 1 from DialogConfigParm c where c.UID_ConfigParm 6= 'TST-53D4A8BCCE4545BBA3A583F45DD57968' ) begin select @Procedurename = OBJECT_NAME(@procid) select top 1 @UID_Task = t.UID_Task from QBMDBQueueTaskMetric 7 t with (nolock) where t.ProcedureName = @Procedurename select @msg = 'No resetting for Task '+ isnull(isnull(@UID_Task, @Procedurename) , 'not named') 8 + '.' exec dbo.QBM_PJournal @msg, @@PROCID, 'W', @DebugLevel goto ende end select @Jobchainname = null select top 1 @Jobchainname = jq.JobChainName 9from @DBQueueCurrent pp join @ObjectKeysToCheck oc on pp.UID_Parameter = oc.Parameter1 join QBMElementAffectedByJob ea with (nolock) on ea.ObjectKeyAffected 10 = oc.Parameter2 join JobQueue jq with (nolock) on ea.UID_Job = jq.UID_Job and jq.IsNoDBQueueDefer = 0 where jq.Ready2EXE like N'[^DH][^I]%' if @Jobchainname 11 is not null begin delete @DBQueueToMove insert into @DBQueueToMove(UID_DialogDBQueue) select cul.UID_DialogDBQueue from @DBQueueCurrent cul join 12@ObjectKeysToCheck oc on cul.UID_Parameter = oc.Parameter1 and ISNULL(cul.UID_SubParameter, '') = case @CountParameterOfTask when 1 then ISNULL(cul.UID_SubParameter 13, '') when 2 then oc.Parameter3 else 'x' end join QBMElementAffectedByJob ea with (readpast) on ea.ObjectKeyAffected = oc.Parameter2 join JobQueue jq with 14 (readpast) on ea.UID_Job = jq.UID_Job and jq.IsNoDBQueueDefer = 0 where jq.JobChainName like case when isnull(@JobChainNameAddOn, '') = '' then '%' when 15 @JobChainNameAddOn like '%[%]' then @JobChainNameAddOn else dbo.QBM_FGIJobCreateName(@JobChainNameAddOn) + '%' end and jq.Ready2EXE like N'[^DH][^I]%' 16 select @erg = @@rowcount if @erg > 0 begin select @SlotNumberSource = @SlotNumber select @SlotnumberTarget = dbo.QBM_FGIDBQueueSlotResetType('JobQueue' 17) exec @RowsMoved = QBM_PDBQCS_CurrentMoveSlot @DBQueueToMove, @SlotNumberSource, @SlotnumberTarget end end if @RowsMoved > 0 begin select @Procedurename 18 = OBJECT_NAME(@procid) if @Procedurename like '___[_]R%' begin select @Procedurename_Z = concat(LEFT(@Procedurename, 4) , 'Z' , SUBSTRING(@Procedurename 19, 6, 30) ) end else begin select @Procedurename_Z = @Procedurename end select top 1 @UID_Task = t.UID_Task from QBMDBQueueTaskMetric t with (nolock) where 20 t.ProcedureName = @Procedurename_Z select @msg = concat('#LDS#Resetting DBQueue tasks {0} because processes {1} related to objects on these tasks are still running in JobQueue.|' 21 , isnull(isnull(@UID_Task, @Procedurename_Z) , 'not named') , '|' , @Jobchainname , '|' ) exec dbo.QBM_PJournal @msg, @@PROCID, 'W', @DebugLevel , @SuppressCount 22 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1 23) WITH NOWAIT END CATCH ende: return (@erg) end 24
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:16:09.187
has TRY/CATCH error handling
Summary: calls QBM_PJournal, QBM_PDBQCS_CurrentMoveSlot, QBM_PSessionErrorAdd; writes INSERT into; reads/joins DialogConfigParm, QBMDBQueueTaskMetric, QBMElementAffectedByJob, JobQueue
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@DBQueueCurrent | qbm_ydbqueuecurrent | input |
@Procid | int | input |
@ObjectKeysToCheck | qbm_yparameterlist | input |
@JobChainNameAddOn | nvarchar(256) | input |
@CountParameterOfTask | int | input |
@SlotNumber | int | input |
DML targets
INSERT intoCalled routines
Read/join references
SQL dependency metadata
Config/session
Config: None extracted.
Session: None extracted.
DBQueue/tasks
None extracted.Temp tables / referenced variables
Temp: #LDS #Resetting
Variables: @DBQueueCurrent @Procid @ObjectKeysToCheck @JobChainNameAddOn @CountParameterOfTask @SlotNumber @erg @msg @DebugLevel @SuppressCount @UID_Task @Procedurename @Procedurename_Z @Jobchainname @SlotNumberSource @SlotNumberTarget @DBQueueToMove @RowsMoved @procid @PROCID @rowcount @SlotnumberTarget @Rethrow
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.
| Referencing object | Relation | Evidence |
|---|---|---|
| dbo.ADS_RAccountInADSGroup | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.ADS_RADSMachineInADSGroup | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.ADS_RBaseTreeOwnsObjectPrepair | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.ADS_RContactInADSGroup | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.ADS_ROrgHasADSGroup | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.ATT_RAttestationAbort | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.ATT_RAttestationCheckValid | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.ATT_RAttestationHelperFill | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.ATT_RAttestationHelperFill_Cfg | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.ATT_RAttestationMakeDecisionCD | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.ATT_RAttestationReminder | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.ATT_RAttestationReset | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.CPL_RComplianceCheckForRule | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.CPL_RITShopMakeDecisionCR | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.CPL_RITShopMakeDecisionOC | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.CPL_RITShopMakeDecisionOH | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.LDP_RAccountInLDAPGroup | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.LDP_RBaseTreeOwnsObjectPrepair | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.LDP_RLDPMachineInLDAPGroup | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.LDP_ROrgHasLDAPGroup | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.POL_RQERPolicyFill | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QBM_RXDateSubItemUpdate | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QBM_RXDateSubItemUpdateFU | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QER_RAllForPersonInBaseTree | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QER_RDynamicGroupTest | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QER_RITShopCheckDecision | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QER_RITShopCheckMethodPR | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QER_RITShopHelperFill | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QER_RITShopHelperFill_Cfg | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QER_RITShopMakeDecisionCD | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QER_RITShopMakeDecisionRI | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QER_RITShopOrderAbort | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QER_RITShopOrderReset | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QER_RITShopProductNodeCheck | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QER_ROrgHasQERAssign | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QER_ROrgHasQERResource | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QER_ROrgHasQERReuse | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QER_ROrgHasQERReuseUS | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QER_RPersonHasQERAssign | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QER_RPersonHasQERResource | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QER_RPersonHasQERReuse | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QER_RPersonHasQERReuseUS | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.RMS_RESetHasEntitlement | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.RMS_ROrgHasESet | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.RMS_RPersonHasESet | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.RMS_RWorkDeskHasESet | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.RPS_ROrgHasRPSReport | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.RPS_RPersonHasRPSReport | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.TSB_RBaseTreeOwnsObjectPrepair | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.TSB_ROrgHasTSBAccountDef | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.TSB_ROrgHasUNSGroupB | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.TSB_ROrgHasUNSGroupB1 | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.TSB_ROrgHasUNSGroupB2 | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.TSB_ROrgHasUNSGroupB3 | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.TSB_RPersonHasTSBAccountDef | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.TSB_RUNSAccountBHasUNSItemB | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.TSB_RUNSAccountBInUNSGroupB | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.TSB_RUNSAccountBInUNSGroupB1 | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.TSB_RUNSAccountBInUNSGroupB2 | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.TSB_RUNSAccountBInUNSGroupB3 | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.TSB_RUNSGroupBHasUNSItemB | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.ADS_RAccountInADSGroup | source text reference | has TRY/CATCH error handling |
| dbo.ADS_RADSMachineInADSGroup | source text reference | has TRY/CATCH error handling |
| dbo.ADS_RBaseTreeOwnsObjectPrepair | source text reference | has TRY/CATCH error handling |
| dbo.ADS_RContactInADSGroup | source text reference | has TRY/CATCH error handling |
| dbo.ADS_ROrgHasADSGroup | source text reference | has TRY/CATCH error handling |
| dbo.ATT_RAttestationAbort | source text reference | has TRY/CATCH error handling |
| dbo.ATT_RAttestationCheckValid | source text reference | has TRY/CATCH error handling |
| dbo.ATT_RAttestationHelperFill | source text reference | has TRY/CATCH error handling |
| dbo.ATT_RAttestationHelperFill_Cfg | source text reference | has TRY/CATCH error handling |
| dbo.ATT_RAttestationMakeDecisionCD | source text reference | has TRY/CATCH error handling |
| dbo.ATT_RAttestationReminder | source text reference | has TRY/CATCH error handling |
| dbo.ATT_RAttestationReset | source text reference | has TRY/CATCH error handling |
| dbo.CPL_RComplianceCheckForRule | source text reference | has TRY/CATCH error handling |
| dbo.CPL_RITShopMakeDecisionCR | source text reference | has TRY/CATCH error handling |
| dbo.CPL_RITShopMakeDecisionOC | source text reference | has TRY/CATCH error handling |
| dbo.CPL_RITShopMakeDecisionOH | source text reference | has TRY/CATCH error handling |
| dbo.LDP_RAccountInLDAPGroup | source text reference | has TRY/CATCH error handling |
| dbo.LDP_RBaseTreeOwnsObjectPrepair | source text reference | has TRY/CATCH error handling |
| dbo.LDP_RLDPMachineInLDAPGroup | source text reference | has TRY/CATCH error handling |
| dbo.LDP_ROrgHasLDAPGroup | source text reference | has TRY/CATCH error handling |
| dbo.POL_RQERPolicyFill | source text reference | has TRY/CATCH error handling |
| dbo.QBM_RXDateSubItemUpdate | source text reference | has TRY/CATCH error handling |
| dbo.QBM_RXDateSubItemUpdateFU | source text reference | has TRY/CATCH error handling |
| dbo.QER_RAllForPersonInBaseTree | source text reference | has TRY/CATCH error handling |
| dbo.QER_RDynamicGroupTest | source text reference | has TRY/CATCH error handling |
| dbo.QER_RITShopCheckDecision | source text reference | has TRY/CATCH error handling |
| dbo.QER_RITShopCheckMethodPR | source text reference | has TRY/CATCH error handling |
| dbo.QER_RITShopHelperFill | source text reference | has TRY/CATCH error handling |
| dbo.QER_RITShopHelperFill_Cfg | source text reference | has TRY/CATCH error handling |
| dbo.QER_RITShopMakeDecisionCD | source text reference | has TRY/CATCH error handling |
| dbo.QER_RITShopMakeDecisionRI | source text reference | has TRY/CATCH error handling |
| dbo.QER_RITShopOrderAbort | source text reference | has TRY/CATCH error handling |
| dbo.QER_RITShopOrderReset | source text reference | has TRY/CATCH error handling |
| dbo.QER_RITShopProductNodeCheck | source text reference | has TRY/CATCH error handling |
| dbo.QER_ROrgHasQERAssign | source text reference | has TRY/CATCH error handling |
| dbo.QER_ROrgHasQERResource | source text reference | has TRY/CATCH error handling |
| dbo.QER_ROrgHasQERReuse | source text reference | has TRY/CATCH error handling |
| dbo.QER_ROrgHasQERReuseUS | source text reference | has TRY/CATCH error handling |
| dbo.QER_RPersonHasQERAssign | source text reference | has TRY/CATCH error handling |
| dbo.QER_RPersonHasQERResource | source text reference | has TRY/CATCH error handling |
| dbo.QER_RPersonHasQERReuse | source text reference | has TRY/CATCH error handling |
| dbo.QER_RPersonHasQERReuseUS | source text reference | has TRY/CATCH error handling |
| dbo.RMS_RESetHasEntitlement | source text reference | has TRY/CATCH error handling |
| dbo.RMS_ROrgHasESet | source text reference | has TRY/CATCH error handling |
| dbo.RMS_RPersonHasESet | source text reference | has TRY/CATCH error handling |
| dbo.RMS_RWorkDeskHasESet | source text reference | has TRY/CATCH error handling |
| dbo.RPS_ROrgHasRPSReport | source text reference | has TRY/CATCH error handling |
| dbo.RPS_RPersonHasRPSReport | source text reference | has TRY/CATCH error handling |
| dbo.TSB_RBaseTreeOwnsObjectPrepair | source text reference | has TRY/CATCH error handling |
| dbo.TSB_ROrgHasTSBAccountDef | source text reference | has TRY/CATCH error handling |
| dbo.TSB_ROrgHasUNSGroupB | source text reference | has TRY/CATCH error handling |
| dbo.TSB_ROrgHasUNSGroupB1 | source text reference | has TRY/CATCH error handling |
| dbo.TSB_ROrgHasUNSGroupB2 | source text reference | has TRY/CATCH error handling |
| dbo.TSB_ROrgHasUNSGroupB3 | source text reference | has TRY/CATCH error handling |
| dbo.TSB_RPersonHasTSBAccountDef | source text reference | has TRY/CATCH error handling |
| dbo.TSB_RUNSAccountBHasUNSItemB | source text reference | has TRY/CATCH error handling |
| dbo.TSB_RUNSAccountBInUNSGroupB | source text reference | has TRY/CATCH error handling |
| dbo.TSB_RUNSAccountBInUNSGroupB1 | source text reference | has TRY/CATCH error handling |
| dbo.TSB_RUNSAccountBInUNSGroupB2 | source text reference | has TRY/CATCH error handling |
| dbo.TSB_RUNSAccountBInUNSGroupB3 | source text reference | has TRY/CATCH error handling |
| dbo.TSB_RUNSGroupBHasUNSItemB | source text reference | has TRY/CATCH error handling |