dbo.QBM_PWatchDogPrepare
SQL_STORED_PROCEDURE
Created 2025-06-27T17:57:37.240 · modified 2026-04-14T23:16:08.980 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
@DeActivate | bit | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| DialogConfigParm | OBJECT_OR_COLUMN | ||
| DialogDatabase | OBJECT_OR_COLUMN | ||
| QBM_PDBQueueInsert_Single | OBJECT_OR_COLUMN | ||
| QBM_PSessionContextSet | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBMDBQueueTask | OBJECT_OR_COLUMN | ||
| dbo | QBM_FGISessionContext | OBJECT_OR_COLUMN | |
| dbo | QBM_FGISessionErrorRethrow | 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_PWatchDogPrepare (@DeActivate bit = 0 ) as begin declare @AgentName nvarchar(256) declare @sqlcmd nvarchar(max) declare 2 @DebugStarttime datetime = getutcdate() declare @DebugLevel char(1) = 'I' declare @Message nvarchar(1000) declare @AgentNameFull nvarchar(256) declare 3 @GenprocID varchar(38) = newid() declare @XUser nvarchar(64) = object_name(@@procid) declare @GenProcID_R varchar(38) = dbo.QBM_FGISessionContext('') 4declare @XUser_R nvarchar(64) = dbo.QBM_FGISessionContext('XUser') SET XACT_ABORT OFF BEGIN TRY exec QBM_PSessionContextSet 'XUser', @XUser if @DeActivate 5 = 0 begin if (select isnull(max(c.XDateUpdated), '1899-12-31') from DialogConfigParm c where c.FullPath like 'QBM\DBServerProperties\%' ) < (select 6 b.create_date from sys.databases b where b.name = 'tempdb' ) and exists (select top 1 1 from QBMDBQueueTask t where t.UID_Task = 'QBM-K-GetServerProperties' 7 ) begin exec QBM_PDBQueueInsert_Single 'QBM-K-GetServerProperties', '', '', @GenProcID end goto ende end if @DeActivate = 1 begin update DialogDatabase 8 set UpdatePhase = 1 where IsMainDatabase = 1 and UpdatePhase = 0 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default declare @Rethrow varchar(1000 9) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH ende: exec QBM_PSessionContextSet 'GenProcID', @GenProcID_R exec 10 QBM_PSessionContextSet 'XUser', @XUser_R return end 11
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:08.980
inserts DBQueue tasks uses session context values has TRY/CATCH error handling
Summary: calls QBM_PSessionContextSet, QBM_PDBQueueInsert_Single, QBM_PSessionErrorAdd; writes UPDATE DialogDatabase; reads/joins DialogConfigParm, sys, QBMDBQueueTask; uses config QBM\DBServerProperties\%; uses session context XUser, GenProcID
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@DeActivate | bit | input |
DML targets
UPDATE DialogDatabaseRead/join references
SQL dependency metadata
Config/session
Config: QBM\DBServerProperties\%
Session: XUser GenProcID
DBQueue/tasks
QBM-K-GetServerPropertiesTemp tables / referenced variables
Temp: None extracted.
Variables: @DeActivate @AgentName @sqlcmd @DebugStarttime @DebugLevel @Message @AgentNameFull @GenprocID @XUser @procid @GenProcID_R @XUser_R @GenProcID @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.QBM_PModuleRemove | source text reference | has TRY/CATCH error handling |
| dbo.QBM_PTableMove | source text reference | SQL_STORED_PROCEDURE |