dbo.QBM_PCustomSQLPropagate_Cont

SQL_STORED_PROCEDURE

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

Open formatted source/search result

Parameters

NameTypeOutput
@UID_QBMCustomSQLvarcharno
@Objectnamenvarcharno

Referenced objects

SchemaObjectColumn/minorClass
QBM_PExecuteSQLWithRetry_LLPOBJECT_OR_COLUMN
QBM_PSessionErrorAddOBJECT_OR_COLUMN
QBM_YSessionErrorTYPE
QBMCustomSQLOBJECT_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_PCustomSQLPropagate_Cont (@UID_QBMCustomSQL varchar(38), @Objectname nvarchar(255) = N'')  as begin declare @ObjectName_intern
2 nvarchar(255) declare @Content nvarchar(max) declare @ErrorMessage nvarchar(4000) declare @ErrorSeverity int  declare @DebugSwitch int = 0 declare @ErrorBuffer
3 QBM_YSessionError SET XACT_ABORT OFF BEGIN TRY if @DebugSwitch > 0 begin print @UID_QBMCustomSQL + '#' + @Objectname end select @ErrorSeverity = 0 select
4 @ObjectName_intern = @ObjectName if isnull(@ObjectName, N'') = N'' begin select @ObjectName_intern = N'<unknown name>' end     SELECT top 1 @content =
5 Scriptcode FROM QBMCustomSQL where UID_QBMCustomSQL = @UID_QBMCustomSQL if @DebugSwitch > 0 begin print isnull(@content, '<no content>') end  begin try
6      if exists (select top 1 1 from sys.procedures p where p.name = 'QBM_PExecuteSQLWithRetry_LLP' ) begin  exec QBM_PExecuteSQLWithRetry_LLP @SQLStatement
7 = @content , @LockTimeout_ms = 10000  , @MaxWaitTimeForLock_s = 60  , @ProcIDForJournal = default , @HandleErrorSilent = 0 , @DeadlockPriority = 8  end
8 else begin exec sp_executesql @content end     end try begin catch select @ErrorSeverity = 18 select @ErrorMessage =concat( N'Could not propagate CustomSQL : '
9 , @Objectname , nchar(13) , nchar(10) , isnull(ERROR_MESSAGE() , '<no message>') )  end catch END TRY BEGIN CATCH select @ErrorSeverity = 18 select @ErrorMessage
10 = isnull(ERROR_MESSAGE() , '<no message>') select @ErrorMessage = concat('#LDS#Error adding {0}.|' , @ObjectName_intern , N'|' , nchar(13) , nchar(10)
11 , @ErrorMessage )   delete @ErrorBuffer insert into @ErrorBuffer (ErrorMessage, ErrorSeverity, ErrorState, ErrorNumber , ProcedureName, ProcedureLine,
12 MessageDate , GenProcID, RepeatCounter, IsReThrow, SourceCode) select @ErrorMessage, @ErrorSeverity, ERROR_STATE(), ERROR_NUMBER() , ERROR_PROCEDURE()
13, ERROR_LINE(), GETUTCDATE() , null, 0, 0, null exec QBM_PSessionErrorAdd @ErrorBuffer RAISERROR (@ErrorMessage, @ErrorSeverity, 1) WITH NOWAIT END CATCH
14 if @ErrorSeverity > 12 or (XACT_STATE()) = -1 begin delete @ErrorBuffer insert into @ErrorBuffer (ErrorMessage, ErrorSeverity, ErrorState, ErrorNumber
15 , ProcedureName, ProcedureLine, MessageDate , GenProcID, RepeatCounter, IsReThrow, SourceCode) select @ErrorMessage, @ErrorSeverity, 1, 50000 , object_name
16(@@PROCID), 187, GETUTCDATE() , null, 0, 0, null exec QBM_PSessionErrorAdd @ErrorBuffer RAISERROR (@ErrorMessage, @ErrorSeverity, 1) WITH NOWAIT end end
17 
18

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:32.103

has TRY/CATCH error handling

Summary: calls QBM_PExecuteSQLWithRetry_LLP, QBM_PSessionErrorAdd; writes INSERT into; reads/joins QBMCustomSQL, sys

Declared parameters

ParameterTypeDirection
@UID_QBMCustomSQLvarchar(38)input
@Objectnamenvarchar(255)input

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 #Error

Variables: @UID_QBMCustomSQL @Objectname @ObjectName_intern @Content @ErrorMessage @ErrorSeverity @DebugSwitch @ErrorBuffer @ObjectName @content @SQLStatement @LockTimeout_ms @MaxWaitTimeForLock_s @ProcIDForJournal @HandleErrorSilent @DeadlockPriority @PROCID

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.QBM_PCustomSQLPropagateSQL expression dependencyOBJECT_OR_COLUMN
dbo.QBM_PCustomSQLPropagatesource text referencehas TRY/CATCH error handling