dbo.QBM_PJobUnfreeze

SQL_STORED_PROCEDURE

Created 2025-06-27T18:01:00.440 · modified 2026-04-14T23:20:31.913 · source: live DB sys.objects/sys.sql_expression_dependencies.

Open formatted source/search result

Parameters

NameTypeOutput
@uid_jobvarcharno
@ReactivationOfvarcharno
@ApplicationNamenvarcharno
@LogonUsernvarcharno

Referenced objects

SchemaObjectColumn/minorClass
jobqueueOBJECT_OR_COLUMN
QBM_PJobQueueSetSameServerOBJECT_OR_COLUMN
QBM_PJobUpdateStateOBJECT_OR_COLUMN
QBM_PSessionErrorAddOBJECT_OR_COLUMN
QBM_PWriteDialogJournalOBJECT_OR_COLUMN
dboQBM_FGIJobQueueMessageAddOBJECT_OR_COLUMN
dboQBM_FGISessionErrorRethrowOBJECT_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_PJobUnfreeze (@uid_job varchar(38) , @ReactivationOf varchar(16) , @ApplicationName nvarchar(64) = '' , @LogonUser nvarchar
2(64) = '' )  as begin declare @uid_tree varchar(38) declare @uid_JobToActivate varchar(38) declare @Retries int declare @nextIsSuccessor bit  declare @JobqueueMessage
3 nvarchar(1000) = concat('#LDS#Reactivation of frozen Job {0} with parameter {1}.|' , @uid_job , '|' , @ReactivationOf , '|' ) declare @XUser nvarchar(64
4) = object_name(@@procid) declare @Xdate datetime = getutcdate() SET XACT_ABORT OFF BEGIN TRY select @uid_tree = null select @uid_tree = uid_tree from 
5jobqueue where uid_job = @uid_job and ready2exe = N'FROZEN' if @uid_tree is null begin raiserror('#LDS#Process step to unfreeze was not found.|', 18, 2
6) with nowait return end if @ReactivationOf not in ('SUCCESS', 'ERROR', 'SELF', 'ROOT') begin raiserror('#LDS#Invalid parameter ''ReactivationOf''. Permitted values are SUCCESS, ERROR, SELF and ROOT.|'
7, 18, 2) with nowait return end  if @ReactivationOf = 'ROOT' begin  select @JobqueueMessage = concat('#LDS#Reactivation of process containing frozen process step {0}.|'
8 , @uid_job , '|' ) update JobQueue set ErrorMessages = dbo.QBM_FGIJobQueueMessageAdd(ErrorMessages, @JobqueueMessage)  , XDateUpdated = @Xdate , XUserUpdated
9 = @XUser where UID_Tree = @uid_tree and Ready2EXE <> N'FALSE' update JobQueue set Ready2EXE = N'FALSE' , UID_JobSameServer = UID_Job , WasError = 0  ,
10 XDateUpdated = @Xdate , XUserUpdated = @XUser where UID_Tree = @uid_tree update JobQueue set Retries = 1  , XDateUpdated = @Xdate , XUserUpdated = @XUser
11 where UID_Tree = @uid_tree and DeferOnError = 1 update JobQueue set Ready2EXE = N'TRUE'  , XDateUpdated = @Xdate , XUserUpdated = @XUser where UID_Tree
12 = @uid_tree and IsRootJob = 1 goto ende end   update jobqueue set ready2exe = N'FALSE'  , XDateUpdated = @Xdate , XUserUpdated = @XUser where uid_tree
13 = @uid_tree and ready2exe = N'LOADED' select @uid_JobToActivate = null  if @ReactivationOf in( 'SUCCESS', 'ERROR') begin update jobqueue set ready2exe=
14 N'FINISHED', xdateupdated = getutcdate()  , XUserUpdated = @XUser  , ErrorMessages = dbo.QBM_FGIJobQueueMessageAdd(ErrorMessages, @JobqueueMessage) where
15 uid_job = @uid_Job if @ReactivationOf = 'SUCCESS' begin select top 1 @uid_JobToActivate = q.UID_JobSuccess, @Retries = isnull(f.Retries, 0) from Jobqueue
16 q left outer join JobQueue f on q.UID_JobSuccess = f.UID_Job where q.UID_Job = @uid_job select @nextIsSuccessor = 1 end else begin select top 1 @uid_JobToActivate
17 = q.UID_JobError, @Retries = isnull(f.Retries, 0) from JobQueue q left outer join JobQueue f on q.UID_JobError = f.UID_Job where q.UID_Job = @uid_job 
18select @nextIsSuccessor = 0 end if isnull(@uid_JobToActivate, '') = '' begin  update jobqueue set ready2exe = N'LOADED' , isToFreezeOnError = 0  , DeferOnError
19 = case @ReactivationOf when 'SUCCESS' then DeferOnError else  0 end , retries = case @ReactivationOf when 'SUCCESS' then 1 else  0 end  , XDateUpdated
20 = @Xdate , XUserUpdated = @XUser where uid_Job = @uid_job  exec QBM_PJobUpdateState @uid_job, 'FINISHED', @nextIsSuccessor, @JobqueueMessage end end  
21if @ReactivationOf = 'SELF' begin select @uid_jobToActivate = @uid_job select @Retries = 1 end if @uid_JobToActivate > ' ' begin update jobqueue set retries
22 = @Retries, ready2exe= N'TRUE', startat = GetUTCDate(), xdateupdated = getutcdate()  , ErrorMessages = case when @ReactivationOf = 'SELF' then dbo.QBM_FGIJobQueueMessageAdd
23(ErrorMessages, @JobqueueMessage) end  , XUserUpdated = @XUser where uid_job = @uid_jobToActivate  exec QBM_PJobQueueSetSameServer @uid_jobToActivate end
24  END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH
25 NOWAIT END CATCH ende:  exec QBM_PWriteDialogJournal @JobqueueMessage, @ApplicationName, @LogonUser, 'W' return end 
26

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:20:31.913

has TRY/CATCH error handling

Summary: calls QBM_PJobUpdateState, QBM_PJobQueueSetSameServer, QBM_PSessionErrorAdd, QBM_PWriteDialogJournal; writes UPDATE JobQueue, UPDATE jobqueue; reads/joins jobqueue, Jobqueue, JobQueue

Declared parameters

ParameterTypeDirection
@uid_jobvarchar(38)input
@ReactivationOfvarchar(16)input
@ApplicationNamenvarchar(64)input
@LogonUsernvarchar(64)input

DML targets

UPDATE JobQueue UPDATE jobqueue

Read/join references

Config/session

Config: None extracted.

Session: None extracted.

DBQueue/tasks

None extracted.

Temp tables / referenced variables

Temp: #LDS #Reactivation #Process #Invalid

Variables: @uid_job @ReactivationOf @ApplicationName @LogonUser @uid_tree @uid_JobToActivate @Retries @nextIsSuccessor @JobqueueMessage @XUser @procid @Xdate @uid_Job @uid_jobToActivate @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.

No reverse dependencies extracted.