dbo.QBM_PQBMDBQueuePondDelete
SQL_STORED_PROCEDURE
Created 2025-06-27T17:57:37.620 · modified 2026-04-14T23:16:09.240 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
@RowLimit | int | no |
@MaxLimit | int | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_PWaitForSeconds | OBJECT_OR_COLUMN | ||
| QBMDBQueuePond | OBJECT_OR_COLUMN | ||
| dbo | QBM_FCVDatetimeToString | OBJECT_OR_COLUMN | |
| dbo | QBM_FGISessionErrorRethrow | OBJECT_OR_COLUMN | |
| dbo | QBM_FGITableCountAll | OBJECT_OR_COLUMN |
Source excerpt
First extracted SQL definition lines from the exported source. Use the full source page for complete context.
1create procedure QBM_PQBMDBQueuePondDelete ( @RowLimit int = 2000 , @MaxLimit int = 80000 ) as begin declare @einRuck int declare @LaufDelete 2 int declare @AnzahlLoesch int declare @AnzahlLoeschGesamt int = 0 declare @Start datetime declare @ende datetime declare @diff int declare @ExpectedRuntime 3 float = 1000.0 declare @PondGroup varchar(38) = null declare @DebugSwitch int = 0 SET XACT_ABORT OFF BEGIN TRY set lock_timeout 50 if dbo.QBM_FGITableCountAll 4('QBMDBQueuePond') > 0 begin goto normal end BEGIN TRY truncate table QBMDBQueuePond select @LaufDelete = 1 END TRY BEGIN CATCH select @LaufDelete = 0 5 END CATCH if @LaufDelete = 1 begin goto endLabel end normal: if @DebugSwitch > 0 begin print dbo.QBM_FCVDatetimeToString(GETUTCDATE()) + ' Pondgroup suchen' 6 end select top 1 @PondGroup = p.PondGroup from QBMDBQueuePond p where GenProcID = 'DELETE' if @PondGroup is null begin goto endlabel end if @DebugSwitch 7 > 0 begin print dbo.QBM_FCVDatetimeToString(GETUTCDATE()) + ' Pondgroup gefunden ' + @PondGroup end select @LaufDelete = 1 select @einRuck = @RowLimit 8 while @LaufDelete > 0 and @AnzahlLoeschGesamt < @MaxLimit begin select @Start = getutcdate() BEGIN TRY delete top (@einRuck) from QBMDBQueuePond where 9 PondGroup = @PondGroup select @AnzahlLoesch = @@rowcount select @LaufDelete = @AnzahlLoesch END TRY BEGIN CATCH select @AnzahlLoesch = 0 exec QBM_PWaitForSeconds 10 0.05 end CATCH select @AnzahlLoeschGesamt += @AnzahlLoesch select @ende = getutcdate() select @diff = DATEDIFF(ms, @start, @ende) if @DebugSwitch > 0 11begin print 'Laufzeit 1 Portion ms ' + str(@diff) end select @einRuck = case when @diff = 0 then @RowLimit when @AnzahlLoesch = 0 then @RowLimit when @diff 12 > @ExpectedRuntime then @RowLimit else convert(int, @ExpectedRuntime * convert(float, @einRuck) / convert(float, @diff)) end end END TRY BEGIN CATCH 13 exec QBM_PSessionErrorAdd default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH 14endLabel: return (@AnzahlLoeschGesamt) end 15
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.240
has TRY/CATCH error handling
Summary: calls QBM_PWaitForSeconds, QBM_PSessionErrorAdd; writes DELETE top; reads/joins QBMDBQueuePond
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@RowLimit | int | input |
@MaxLimit | int | input |
DML targets
DELETE topCalled routines
Read/join references
SQL dependency metadata
Config/session
Config: None extracted.
Session: None extracted.
DBQueue/tasks
None extracted.Temp tables / referenced variables
Temp: None extracted.
Variables: @RowLimit @MaxLimit @einRuck @LaufDelete @AnzahlLoesch @AnzahlLoeschGesamt @Start @ende @diff @ExpectedRuntime @PondGroup @DebugSwitch @rowcount @start @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_PWorkDBQueueDelete | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QBM_PWorkDBQueueDelete | source text reference | uses session context values, has TRY/CATCH error handling |