dbo.QBM_PTransactionLevelCheck
SQL_STORED_PROCEDURE
Created 2025-06-27T17:57:29.430 · modified 2026-04-14T23:20:26.140 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
@ExpectedLevel | int | no |
@SourceProcedure | int | no |
@DebugComment | nvarchar | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| QBM_PJournal | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| dbo | QBM_FGIsessionErrorIsMissingCO | 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_PTransactionLevelCheck (@ExpectedLevel int , @SourceProcedure int = 0 , @DebugComment nvarchar(1000) = N'' ) as begin declare 2 @Message nvarchar(1000) declare @procname nvarchar(256) declare @DebugLevel char(1) = 'W' SET XACT_ABORT OFF BEGIN TRY if @@TRANCOUNT = ISNULL(@ExpectedLevel 3, 0) begin exec QBM_PJournal 'Level OK', @@PROCID, 'I', @DebugLevel goto endLabel end if @SourceProcedure = 0 begin select @Procname = object_name(@@procid 4) end else begin select @Procname = object_name(@SourceProcedure) end select @Message = '#LDS#Expected transaction count {0} does not match existing {1}, called from {2}.|' 5 + str(isnull(@ExpectedLevel, 0)) + '|' + str( @@TRANCOUNT) + '|' + @Procname + '|' if @DebugComment > ' ' begin select @Message = @Message + ', ' + @DebugComment 6 end select @Message = @Message + ')' rollback transaction exec QBM_PJournal @Message, @@PROCID, 'E', @DebugLevel raiserror (@Message, 18, 1) with nowait 7 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default if dbo.QBM_FGIsessionErrorIsMissingCO(default)= 0 begin rollback transaction declare @Rethrow varchar 8(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT end END CATCH endLabel: return end 9
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:26.140
has TRY/CATCH error handling
Summary: calls QBM_PJournal, QBM_PSessionErrorAdd
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@ExpectedLevel | int | input |
@SourceProcedure | int | input |
@DebugComment | nvarchar(1000) | input |
DML targets
None extracted.Called routines
Read/join references
None extracted.
SQL dependency metadata
Config/session
Config: None extracted.
Session: None extracted.
DBQueue/tasks
None extracted.Temp tables / referenced variables
Temp: #LDS #Expected
Variables: @ExpectedLevel @SourceProcedure @DebugComment @Message @procname @DebugLevel @TRANCOUNT @PROCID @Procname @procid @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.ATT_PHelperAttestationPolicy | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QBM_PDBQCS_CurrentRestore | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QBM_PDBQCS_SlotExec | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QBM_PDBQCS_SlotFill | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QBM_PDBQCS_SlotFill_Range | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QBM_PDBQCS_SlotRunner | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QBM_PWorkDBQueueDelete | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QBM_PWorkHistoryDelete | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QBM_PWorkJobQueueDelete | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QBM_PWorkMaintenance | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QBM_PWorkSchedule | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QBM_ZJobHistoryShrink_Pat | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QBM_ZProcessShrink_Pat | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QBM_ZProgressViewShrink_Pat | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QBM_ZWatchShrink_Pat | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.ATT_PHelperAttestationPolicy | source text reference | uses session context values, has TRY/CATCH error handling |
| dbo.QBM_PDBQCS_CurrentRestore | source text reference | inserts DBQueue tasks, uses session context values, has TRY/CATCH error handling |
| dbo.QBM_PDBQCS_SlotExec | source text reference | uses ChangeLimit/session/config throttling, uses session context values, has TRY/CATCH error handling |
| dbo.QBM_PDBQCS_SlotFill | source text reference | has TRY/CATCH error handling |
| dbo.QBM_PDBQCS_SlotFill_Range | source text reference | has TRY/CATCH error handling |
| dbo.QBM_PDBQCS_SlotRunner | source text reference | inserts DBQueue tasks, uses session context values, has TRY/CATCH error handling |
| dbo.QBM_PWorkDBQueueDelete | source text reference | uses session context values, has TRY/CATCH error handling |
| dbo.QBM_PWorkHistoryDelete | source text reference | uses session context values, has TRY/CATCH error handling |
| dbo.QBM_PWorkJobQueueDelete | source text reference | uses session context values, has TRY/CATCH error handling |
| dbo.QBM_PWorkMaintenance | source text reference | uses session context values, has TRY/CATCH error handling |
| dbo.QBM_PWorkSchedule | source text reference | inserts DBQueue tasks, uses session context values, has TRY/CATCH error handling |
| dbo.QBM_ZJobHistoryShrink_Pat | source text reference | has TRY/CATCH error handling |
| dbo.QBM_ZProcessShrink_Pat | source text reference | uses session context values, has TRY/CATCH error handling |
| dbo.QBM_ZProgressViewShrink_Pat | source text reference | uses session context values, has TRY/CATCH error handling |
| dbo.QBM_ZWatchShrink_Pat | source text reference | has TRY/CATCH error handling |