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.

Open formatted source/search result

Parameters

NameTypeOutput
@DBQueueCurrentQBM_YDBQueueCurrentno
@Procidintno
@ObjectKeysToCheckQBM_YParameterListno
@JobChainNameAddOnnvarcharno
@CountParameterOfTaskintno
@SlotNumberintno

Referenced objects

SchemaObjectColumn/minorClass
DialogConfigParmOBJECT_OR_COLUMN
JobQueueOBJECT_OR_COLUMN
QBM_PDBQCS_CurrentMoveSlotOBJECT_OR_COLUMN
QBM_PSessionErrorAddOBJECT_OR_COLUMN
QBM_YDBQCSCurrentToMoveTYPE
QBM_YDBQueueCurrentTYPE
QBM_YParameterListTYPE
QBMDBQueueTaskMetricOBJECT_OR_COLUMN
QBMElementAffectedByJobOBJECT_OR_COLUMN
dboQBM_FGIDBQueueSlotResetTypeOBJECT_OR_COLUMN
dboQBM_FGIJobCreateNameOBJECT_OR_COLUMN
dboQBM_FGISessionErrorRethrowOBJECT_OR_COLUMN
dboQBM_PJournalOBJECT_OR_COLUMN

Source excerpt

First extracted SQL definition lines from the exported source. Use the full source page for complete context.

Open full formatted source

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

ParameterTypeDirection
@DBQueueCurrentqbm_ydbqueuecurrentinput
@Procidintinput
@ObjectKeysToCheckqbm_yparameterlistinput
@JobChainNameAddOnnvarchar(256)input
@CountParameterOfTaskintinput
@SlotNumberintinput

DML targets

INSERT into

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 objectRelationEvidence
dbo.ADS_RAccountInADSGroupSQL expression dependencyOBJECT_OR_COLUMN
dbo.ADS_RADSMachineInADSGroupSQL expression dependencyOBJECT_OR_COLUMN
dbo.ADS_RBaseTreeOwnsObjectPrepairSQL expression dependencyOBJECT_OR_COLUMN
dbo.ADS_RContactInADSGroupSQL expression dependencyOBJECT_OR_COLUMN
dbo.ADS_ROrgHasADSGroupSQL expression dependencyOBJECT_OR_COLUMN
dbo.ATT_RAttestationAbortSQL expression dependencyOBJECT_OR_COLUMN
dbo.ATT_RAttestationCheckValidSQL expression dependencyOBJECT_OR_COLUMN
dbo.ATT_RAttestationHelperFillSQL expression dependencyOBJECT_OR_COLUMN
dbo.ATT_RAttestationHelperFill_CfgSQL expression dependencyOBJECT_OR_COLUMN
dbo.ATT_RAttestationMakeDecisionCDSQL expression dependencyOBJECT_OR_COLUMN
dbo.ATT_RAttestationReminderSQL expression dependencyOBJECT_OR_COLUMN
dbo.ATT_RAttestationResetSQL expression dependencyOBJECT_OR_COLUMN
dbo.CPL_RComplianceCheckForRuleSQL expression dependencyOBJECT_OR_COLUMN
dbo.CPL_RITShopMakeDecisionCRSQL expression dependencyOBJECT_OR_COLUMN
dbo.CPL_RITShopMakeDecisionOCSQL expression dependencyOBJECT_OR_COLUMN
dbo.CPL_RITShopMakeDecisionOHSQL expression dependencyOBJECT_OR_COLUMN
dbo.LDP_RAccountInLDAPGroupSQL expression dependencyOBJECT_OR_COLUMN
dbo.LDP_RBaseTreeOwnsObjectPrepairSQL expression dependencyOBJECT_OR_COLUMN
dbo.LDP_RLDPMachineInLDAPGroupSQL expression dependencyOBJECT_OR_COLUMN
dbo.LDP_ROrgHasLDAPGroupSQL expression dependencyOBJECT_OR_COLUMN
dbo.POL_RQERPolicyFillSQL expression dependencyOBJECT_OR_COLUMN
dbo.QBM_RXDateSubItemUpdateSQL expression dependencyOBJECT_OR_COLUMN
dbo.QBM_RXDateSubItemUpdateFUSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_RAllForPersonInBaseTreeSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_RDynamicGroupTestSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_RITShopCheckDecisionSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_RITShopCheckMethodPRSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_RITShopHelperFillSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_RITShopHelperFill_CfgSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_RITShopMakeDecisionCDSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_RITShopMakeDecisionRISQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_RITShopOrderAbortSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_RITShopOrderResetSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_RITShopProductNodeCheckSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_ROrgHasQERAssignSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_ROrgHasQERResourceSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_ROrgHasQERReuseSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_ROrgHasQERReuseUSSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_RPersonHasQERAssignSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_RPersonHasQERResourceSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_RPersonHasQERReuseSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_RPersonHasQERReuseUSSQL expression dependencyOBJECT_OR_COLUMN
dbo.RMS_RESetHasEntitlementSQL expression dependencyOBJECT_OR_COLUMN
dbo.RMS_ROrgHasESetSQL expression dependencyOBJECT_OR_COLUMN
dbo.RMS_RPersonHasESetSQL expression dependencyOBJECT_OR_COLUMN
dbo.RMS_RWorkDeskHasESetSQL expression dependencyOBJECT_OR_COLUMN
dbo.RPS_ROrgHasRPSReportSQL expression dependencyOBJECT_OR_COLUMN
dbo.RPS_RPersonHasRPSReportSQL expression dependencyOBJECT_OR_COLUMN
dbo.TSB_RBaseTreeOwnsObjectPrepairSQL expression dependencyOBJECT_OR_COLUMN
dbo.TSB_ROrgHasTSBAccountDefSQL expression dependencyOBJECT_OR_COLUMN
dbo.TSB_ROrgHasUNSGroupBSQL expression dependencyOBJECT_OR_COLUMN
dbo.TSB_ROrgHasUNSGroupB1SQL expression dependencyOBJECT_OR_COLUMN
dbo.TSB_ROrgHasUNSGroupB2SQL expression dependencyOBJECT_OR_COLUMN
dbo.TSB_ROrgHasUNSGroupB3SQL expression dependencyOBJECT_OR_COLUMN
dbo.TSB_RPersonHasTSBAccountDefSQL expression dependencyOBJECT_OR_COLUMN
dbo.TSB_RUNSAccountBHasUNSItemBSQL expression dependencyOBJECT_OR_COLUMN
dbo.TSB_RUNSAccountBInUNSGroupBSQL expression dependencyOBJECT_OR_COLUMN
dbo.TSB_RUNSAccountBInUNSGroupB1SQL expression dependencyOBJECT_OR_COLUMN
dbo.TSB_RUNSAccountBInUNSGroupB2SQL expression dependencyOBJECT_OR_COLUMN
dbo.TSB_RUNSAccountBInUNSGroupB3SQL expression dependencyOBJECT_OR_COLUMN
dbo.TSB_RUNSGroupBHasUNSItemBSQL expression dependencyOBJECT_OR_COLUMN
dbo.ADS_RAccountInADSGroupsource text referencehas TRY/CATCH error handling
dbo.ADS_RADSMachineInADSGroupsource text referencehas TRY/CATCH error handling
dbo.ADS_RBaseTreeOwnsObjectPrepairsource text referencehas TRY/CATCH error handling
dbo.ADS_RContactInADSGroupsource text referencehas TRY/CATCH error handling
dbo.ADS_ROrgHasADSGroupsource text referencehas TRY/CATCH error handling
dbo.ATT_RAttestationAbortsource text referencehas TRY/CATCH error handling
dbo.ATT_RAttestationCheckValidsource text referencehas TRY/CATCH error handling
dbo.ATT_RAttestationHelperFillsource text referencehas TRY/CATCH error handling
dbo.ATT_RAttestationHelperFill_Cfgsource text referencehas TRY/CATCH error handling
dbo.ATT_RAttestationMakeDecisionCDsource text referencehas TRY/CATCH error handling
dbo.ATT_RAttestationRemindersource text referencehas TRY/CATCH error handling
dbo.ATT_RAttestationResetsource text referencehas TRY/CATCH error handling
dbo.CPL_RComplianceCheckForRulesource text referencehas TRY/CATCH error handling
dbo.CPL_RITShopMakeDecisionCRsource text referencehas TRY/CATCH error handling
dbo.CPL_RITShopMakeDecisionOCsource text referencehas TRY/CATCH error handling
dbo.CPL_RITShopMakeDecisionOHsource text referencehas TRY/CATCH error handling
dbo.LDP_RAccountInLDAPGroupsource text referencehas TRY/CATCH error handling
dbo.LDP_RBaseTreeOwnsObjectPrepairsource text referencehas TRY/CATCH error handling
dbo.LDP_RLDPMachineInLDAPGroupsource text referencehas TRY/CATCH error handling
dbo.LDP_ROrgHasLDAPGroupsource text referencehas TRY/CATCH error handling
dbo.POL_RQERPolicyFillsource text referencehas TRY/CATCH error handling
dbo.QBM_RXDateSubItemUpdatesource text referencehas TRY/CATCH error handling
dbo.QBM_RXDateSubItemUpdateFUsource text referencehas TRY/CATCH error handling
dbo.QER_RAllForPersonInBaseTreesource text referencehas TRY/CATCH error handling
dbo.QER_RDynamicGroupTestsource text referencehas TRY/CATCH error handling
dbo.QER_RITShopCheckDecisionsource text referencehas TRY/CATCH error handling
dbo.QER_RITShopCheckMethodPRsource text referencehas TRY/CATCH error handling
dbo.QER_RITShopHelperFillsource text referencehas TRY/CATCH error handling
dbo.QER_RITShopHelperFill_Cfgsource text referencehas TRY/CATCH error handling
dbo.QER_RITShopMakeDecisionCDsource text referencehas TRY/CATCH error handling
dbo.QER_RITShopMakeDecisionRIsource text referencehas TRY/CATCH error handling
dbo.QER_RITShopOrderAbortsource text referencehas TRY/CATCH error handling
dbo.QER_RITShopOrderResetsource text referencehas TRY/CATCH error handling
dbo.QER_RITShopProductNodeChecksource text referencehas TRY/CATCH error handling
dbo.QER_ROrgHasQERAssignsource text referencehas TRY/CATCH error handling
dbo.QER_ROrgHasQERResourcesource text referencehas TRY/CATCH error handling
dbo.QER_ROrgHasQERReusesource text referencehas TRY/CATCH error handling
dbo.QER_ROrgHasQERReuseUSsource text referencehas TRY/CATCH error handling
dbo.QER_RPersonHasQERAssignsource text referencehas TRY/CATCH error handling
dbo.QER_RPersonHasQERResourcesource text referencehas TRY/CATCH error handling
dbo.QER_RPersonHasQERReusesource text referencehas TRY/CATCH error handling
dbo.QER_RPersonHasQERReuseUSsource text referencehas TRY/CATCH error handling
dbo.RMS_RESetHasEntitlementsource text referencehas TRY/CATCH error handling
dbo.RMS_ROrgHasESetsource text referencehas TRY/CATCH error handling
dbo.RMS_RPersonHasESetsource text referencehas TRY/CATCH error handling
dbo.RMS_RWorkDeskHasESetsource text referencehas TRY/CATCH error handling
dbo.RPS_ROrgHasRPSReportsource text referencehas TRY/CATCH error handling
dbo.RPS_RPersonHasRPSReportsource text referencehas TRY/CATCH error handling
dbo.TSB_RBaseTreeOwnsObjectPrepairsource text referencehas TRY/CATCH error handling
dbo.TSB_ROrgHasTSBAccountDefsource text referencehas TRY/CATCH error handling
dbo.TSB_ROrgHasUNSGroupBsource text referencehas TRY/CATCH error handling
dbo.TSB_ROrgHasUNSGroupB1source text referencehas TRY/CATCH error handling
dbo.TSB_ROrgHasUNSGroupB2source text referencehas TRY/CATCH error handling
dbo.TSB_ROrgHasUNSGroupB3source text referencehas TRY/CATCH error handling
dbo.TSB_RPersonHasTSBAccountDefsource text referencehas TRY/CATCH error handling
dbo.TSB_RUNSAccountBHasUNSItemBsource text referencehas TRY/CATCH error handling
dbo.TSB_RUNSAccountBInUNSGroupBsource text referencehas TRY/CATCH error handling
dbo.TSB_RUNSAccountBInUNSGroupB1source text referencehas TRY/CATCH error handling
dbo.TSB_RUNSAccountBInUNSGroupB2source text referencehas TRY/CATCH error handling
dbo.TSB_RUNSAccountBInUNSGroupB3source text referencehas TRY/CATCH error handling
dbo.TSB_RUNSGroupBHasUNSItemBsource text referencehas TRY/CATCH error handling