dbo.QBM_PSlotResetOnMissingItem_L

SQL_STORED_PROCEDURE

Created 2025-06-27T17:57:37.547 · modified 2026-04-14T23:16:09.200 · source: live DB sys.objects/sys.sql_expression_dependencies.

Open formatted source/search result

Parameters

NameTypeOutput
@DBQueueCurrentQBM_YDBQueueCurrentno
@TableNamevarcharno
@PKColumnNamevarcharno
@SlotNumberintno

Referenced objects

SchemaObjectColumn/minorClass
QBM_PJournalOBJECT_OR_COLUMN
QBM_PSessionErrorAddOBJECT_OR_COLUMN
QBM_PSQLCreateOBJECT_OR_COLUMN
QBM_PWaitForSecondsOBJECT_OR_COLUMN
QBM_YDBQueueCurrentTYPE
dboQBM_FGIBitPatternXMarkedForDelOBJECT_OR_COLUMN
dboQBM_FGICodeNameOBJECT_OR_COLUMN
dboQBM_FGIColumnExistsOBJECT_OR_COLUMN
dboQBM_FGISessionErrorRethrowOBJECT_OR_COLUMN
dboQBM_FSQProcedureDefOBJECT_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

1create   procedure QBM_PSlotResetOnMissingItem_L (@DBQueueCurrent QBM_YDBQueueCurrent readonly , @TableName varchar(30) , @PKColumnName varchar(30
2) , @SlotNumber int ) as begin declare @erg int = 0 declare @DebugSwitch int = 0 declare @DebugLevel char(1) = 'W'  declare @ProcName varchar(30) declare
3 @ProcDef nvarchar(max) declare @ProcBody nvarchar(max) declare @OutstandingTest nvarchar(1000) declare @SourceName nvarchar(1000) declare @ErrorMessage
4 nvarchar(4000) declare @ErrorSeverity int declare @ErrorState int declare @anlegenklappt bit = 0 declare @waitTime float declare @UnComment bit = 0 ,@Unformat
5 bit = 1 SET XACT_ABORT OFF BEGIN TRY select @ProcName = dbo.QBM_FGICodeName('PSR', concat(@TableName, @PKColumnName ))  if @DebugSwitch > 0 begin select
6 @UnComment = 0 , @Unformat = 0 print @ProcName  end if dbo.QBM_FGIColumnExists(@TableName, 'XMarkedForDeletion') = 1 begin select @OutstandingTest = str
7(dbo.QBM_FGIBitPatternXMarkedForDel('|OutStanding|', 0)) + ' & b.XMarkedForDeletion > 0' end else begin select @OutstandingTest = '' end while not exists
8 (select top 1 1 from sys.objects o where o.name = @ProcName ) begin if @DebugSwitch > 0 begin print 'dann bauen wir eine' end select @waitTime = convert
9(float, @@spid) / 1000.0 exec QBM_PWaitForSeconds @waittime select @ProcBody = CONCAT( '
10 declare @SlotNumberSource int
11 declare @SlotNumberTarget int
12 declare @DBQueueToMove QBM_YDBQCSCurrentToMove 
13 declare @outs int = 0
14 declare @missing int = 0
15 declare @DebugLevel varchar(1) = '''
16, @DebugLevel , '''
17 
18	SET XACT_ABORT OFF
19
20 	-- befüllen mit den interessanten Einträgen
21	insert into @DBQueueToMove(UID_DialogDBQueue)
22		select cul.UID_DialogDBQueue
23		from @DBQueueCurrent cul  -- Suchbedingung
24						left outer join '
25, @TableName, ' b with (readpast) on cul.UID_Parameter = b.', @PKColumnName , ' 
26		where b.', @PKColumnName , ' is null
27								
28	select @missing = @@rowcount
29
30					'
31, case when @OutstandingTest > ' ' then concat('
32	insert into @DBQueueToMove(UID_DialogDBQueue)
33		select cul.UID_DialogDBQueue
34		from @DBQueueCurrent cul  -- Suchbedingung
35								join '
36, @TableName, ' b with (readpast) on cul.UID_Parameter = b.', @PKColumnName , ' 
37		where ', @OutstandingTest, '
38
39	select @outs = @@rowcount 
40
41	if @outs > 0
42	 begin
43		declare @msg nvarchar(1000) = ''#LDS#DBQueue task not processed because of outstanding elements. Table: {0}.|'' + '''
44, @TableName, ''' + ''|''
45
46		exec QBM_PJournal @msg, @@procid, ''W'', @DebugLevel, 20
47	 end ') else '' end, '
48
49	if @outs + @missing > 0
50	 begin
51
52		select @SlotNumberSource = @SlotNumber -- die übergebene Slotnummer
53		select @SlotnumberTarget = 0
54																			
55		exec @ret = QBM_PDBQCS_CurrentMoveSlot @DBQueueToMove, @SlotNumberSource, @SlotnumberTarget
56
57	  end
58
59				'
60 ) select @SourceName = concat('QBM_PSlotResetOnMissingItem_L' , '(' , @TableName , '.' , @PKColumnName , ')' ) select @procdef = dbo.QBM_FSQProcedureDef
61(@ProcName , '@DBQueueCurrent QBM_YDBQueueCurrent readonly
62												, @SlotNumber int
63											' , @ProcBody , @SourceName ) if @DebugSwitch > 0
64 begin print @procdef end    begin transaction if not exists (select top 1 1 from sys.objects o where o.name = @ProcName ) begin BEGIN TRY exec QBM_PSQLCreate
65 @Procname, 'P', @procDef, @UnComment = @UnComment, @Unformat = @Unformat select @anlegenklappt = 1 END TRY BEGIN CATCH select @anlegenklappt = 0  END 
66CATCH end  if @anlegenklappt = 1 begin commit select @ErrorMessage = 'angelegt ' + @SourceName end else begin rollback  select @ErrorMessage = 'bumm     '
67 + @SourceName end if @DebugSwitch > 0 begin exec QBM_PJournal @Errormessage, @@procid, 'D', @DebugLevel end  select @waitTime = (convert(float, @@spid
68) / 1000.0) + 0.4 exec QBM_PWaitForSeconds @waittime end   exec @erg = @ProcName @DBQueueCurrent, @SlotNumber END TRY BEGIN CATCH exec QBM_PSessionErrorAdd
69 default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH  endLabel: return (@erg) end
70 
71

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.200

has TRY/CATCH error handling

Summary: calls QBM_PWaitForSeconds, QBM_PJournal, QBM_PDBQCS_CurrentMoveSlot, QBM_PSQLCreate, QBM_PSessionErrorAdd; writes INSERT into; reads/joins sys

Declared parameters

ParameterTypeDirection
@DBQueueCurrentqbm_ydbqueuecurrentinput
@TableNamevarchar(30)input
@PKColumnNamevarchar(30)input
@SlotNumberintinput

DML targets

INSERT into

Read/join references

Config/session

Config: None extracted.

Session: None extracted.

DBQueue/tasks

None extracted.

Temp tables / referenced variables

Temp: #LDS #DBQueue

Variables: @DBQueueCurrent @TableName @PKColumnName @SlotNumber @erg @DebugSwitch @DebugLevel @ProcName @ProcDef @ProcBody @OutstandingTest @SourceName @ErrorMessage @ErrorSeverity @ErrorState @anlegenklappt @waitTime @UnComment @Unformat @spid @waittime @SlotNumberSource @SlotNumberTarget @DBQueueToMove @outs @missing @rowcount @msg @procid @SlotnumberTarget @ret @procdef @Procname @procDef @Errormessage @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_RBaseTreeHasObjectSQL expression dependencyOBJECT_OR_COLUMN
dbo.ADS_RBaseTreeOwnsObjectPrepairSQL expression dependencyOBJECT_OR_COLUMN
dbo.ADS_RContactInADSGroupSQL expression dependencyOBJECT_OR_COLUMN
dbo.ADS_RGroupInADSGroupSQL expression dependencyOBJECT_OR_COLUMN
dbo.ADS_ROrgHasADSGroupSQL expression dependencyOBJECT_OR_COLUMN
dbo.ADS_RPersonHasObjectSQL expression dependencyOBJECT_OR_COLUMN
dbo.CPL_RComplianceCheckForPersonSQL expression dependencyOBJECT_OR_COLUMN
dbo.LDP_RAccountInLDAPGroupSQL expression dependencyOBJECT_OR_COLUMN
dbo.LDP_RBaseTreeHasObjectSQL expression dependencyOBJECT_OR_COLUMN
dbo.LDP_RBaseTreeOwnsObjectPrepairSQL expression dependencyOBJECT_OR_COLUMN
dbo.LDP_RGroupInLDAPGroupSQL expression dependencyOBJECT_OR_COLUMN
dbo.LDP_ROrgHasLDAPGroupSQL expression dependencyOBJECT_OR_COLUMN
dbo.LDP_RPersonHasObjectSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_RAccProductGroupCollectionSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_RBaseTreeCollectionFSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_RBaseTreeHasObjectSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_RBaseTreeHasObjectExtAttSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_RHelperHardwareOrgSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_RHelperHeadOrgSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_RHelperHeadPersonSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_RHelperPersonOrgSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_RHelperWorkDeskOrgSQL 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_RPersonCheckDynUserSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_RPersonHasObjectSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_RPersonHasObjectExtAttSQL 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.RMB_RHelperHardwareOrgSQL expression dependencyOBJECT_OR_COLUMN
dbo.RMB_RHelperPersonOrgSQL expression dependencyOBJECT_OR_COLUMN
dbo.RMB_RHelperWorkDeskOrgSQL expression dependencyOBJECT_OR_COLUMN
dbo.RMS_RBaseTreeHasObjectSQL 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_RPersonHasObjectSQL expression dependencyOBJECT_OR_COLUMN
dbo.RMS_RWorkDeskHasESetSQL expression dependencyOBJECT_OR_COLUMN
dbo.RPS_RBaseTreeHasObjectSQL expression dependencyOBJECT_OR_COLUMN
dbo.RPS_ROrgHasRPSReportSQL expression dependencyOBJECT_OR_COLUMN
dbo.RPS_RPersonHasObjectSQL expression dependencyOBJECT_OR_COLUMN
dbo.RPS_RPersonHasRPSReportSQL expression dependencyOBJECT_OR_COLUMN
dbo.TSB_RBaseTreeHasObjectSQL 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_RPersonHasObjectSQL 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_RUNSGroupB1InUNSGroupB1SQL expression dependencyOBJECT_OR_COLUMN
dbo.TSB_RUNSGroupB2InUNSGroupB2SQL expression dependencyOBJECT_OR_COLUMN
dbo.TSB_RUNSGroupB3InUNSGroupB3SQL expression dependencyOBJECT_OR_COLUMN
dbo.TSB_RUNSGroupBHasUNSItemBSQL expression dependencyOBJECT_OR_COLUMN
dbo.TSB_RUNSGroupBInUNSGroupBSQL expression dependencyOBJECT_OR_COLUMN
dbo.ADS_RAccountInADSGroupsource text referencehas TRY/CATCH error handling
dbo.ADS_RADSMachineInADSGroupsource text referencehas TRY/CATCH error handling
dbo.ADS_RBaseTreeHasObjectsource 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_RGroupInADSGroupsource text referencehas TRY/CATCH error handling
dbo.ADS_ROrgHasADSGroupsource text referencehas TRY/CATCH error handling
dbo.ADS_RPersonHasObjectsource text referencehas TRY/CATCH error handling
dbo.CPL_RComplianceCheckForPersonsource text referencehas TRY/CATCH error handling
dbo.LDP_RAccountInLDAPGroupsource text referencehas TRY/CATCH error handling
dbo.LDP_RBaseTreeHasObjectsource text referencehas TRY/CATCH error handling
dbo.LDP_RBaseTreeOwnsObjectPrepairsource text referencehas TRY/CATCH error handling
dbo.LDP_RGroupInLDAPGroupsource text referencehas TRY/CATCH error handling
dbo.LDP_ROrgHasLDAPGroupsource text referencehas TRY/CATCH error handling
dbo.LDP_RPersonHasObjectsource text referencehas TRY/CATCH error handling
dbo.QER_RAccProductGroupCollectionsource text referencehas TRY/CATCH error handling
dbo.QER_RBaseTreeCollectionFsource text referencehas TRY/CATCH error handling
dbo.QER_RBaseTreeHasObjectsource text referencehas TRY/CATCH error handling
dbo.QER_RBaseTreeHasObjectExtAttsource text referencehas TRY/CATCH error handling
dbo.QER_RHelperHardwareOrgsource text referencehas TRY/CATCH error handling
dbo.QER_RHelperHeadOrgsource text referencehas TRY/CATCH error handling
dbo.QER_RHelperHeadPersonsource text referencehas TRY/CATCH error handling
dbo.QER_RHelperPersonOrgsource text referencehas TRY/CATCH error handling
dbo.QER_RHelperWorkDeskOrgsource 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_RPersonCheckDynUsersource text referencehas TRY/CATCH error handling
dbo.QER_RPersonHasObjectsource text referencehas TRY/CATCH error handling
dbo.QER_RPersonHasObjectExtAttsource 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.RMB_RHelperHardwareOrgsource text referencehas TRY/CATCH error handling
dbo.RMB_RHelperPersonOrgsource text referencehas TRY/CATCH error handling
dbo.RMB_RHelperWorkDeskOrgsource text referencehas TRY/CATCH error handling
dbo.RMS_RBaseTreeHasObjectsource 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_RPersonHasObjectsource text referencehas TRY/CATCH error handling
dbo.RMS_RWorkDeskHasESetsource text referencehas TRY/CATCH error handling
dbo.RPS_RBaseTreeHasObjectsource text referencehas TRY/CATCH error handling
dbo.RPS_ROrgHasRPSReportsource text referencehas TRY/CATCH error handling
dbo.RPS_RPersonHasObjectsource text referencehas TRY/CATCH error handling
dbo.RPS_RPersonHasRPSReportsource text referencehas TRY/CATCH error handling
dbo.TSB_RBaseTreeHasObjectsource 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_RPersonHasObjectsource 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_RUNSGroupB1InUNSGroupB1source text referencehas TRY/CATCH error handling
dbo.TSB_RUNSGroupB2InUNSGroupB2source text referencehas TRY/CATCH error handling
dbo.TSB_RUNSGroupB3InUNSGroupB3source text referencehas TRY/CATCH error handling
dbo.TSB_RUNSGroupBHasUNSItemBsource text referencehas TRY/CATCH error handling
dbo.TSB_RUNSGroupBInUNSGroupBsource text referencehas TRY/CATCH error handling