dbo.QBM_PDBQueueInsert_Bulk
Stored ProcedureSQL_STORED_PROCEDURESandbox DB
Interpretation
- Database routine. Review parameters, called procedures, DBQueue inserts, and QBM_PJobCreate helper calls before assuming side effects.
- DBQueue relation detected. Follow the task procedure and referenced-by list for async processing.
Verified DBQueue Bulk Insert Router Notes
- Source catalog entry
dbo.QBM_PDBQueueInsert_Bulkis a non-generated SQL stored procedure fromsandbox-db sys.sql_modules. - The procedure signature contains
@UID_Taskand readonly table-valued parameter@DBQueueElements QBM_YDBQueueRaw; obsolete dummy parameters are rejected when they are not-1111. - If no rows exist in
@DBQueueElements, the source jumps toEndLabelwithout enqueue work. - When session context
TempQueueis set and temp table#QBMDBQueueTempexists, the source validates@UID_TaskagainstQBMDBQueueTaskMetricand inserts(UID_Task, Object, SubObject, GenProcID)into#QBMDBQueueTemp. - When session context
QBMDBQueuePondis set, the source validates@UID_TaskagainstQBMDBQueueTaskMetricand inserts rows intoQBMDBQueuePond, then sets session contextINSERTEDINTODBQUEUEto1. - The standard path delegates to
QBM_PDBQueueInsert_Int @UID_Task = @UID_Task, @DBQueueElements = @DBQueueElements. - Generated source-index flags show
HasDBQueueInsertBulk=1,HasDBQueueInsertSingle=0,HasChangeLimit=0, andHasQbmPJobCreate=0; the source index found 512 SQL modules referencing this procedure.
Operational meaning: This is the bulk DBQueue insertion router. Verified behavior splits between temp queue, pond queue, and standard internal insertion paths; use `QBM_PDBQueueInsert_Int` for the standard final queue-write logic.
Relations
- Bulk DBQueue insert -> W at line 1
- References QBM_PDBQueueInsert_Bulk
Typed Edges
- queues DBQueue task W at line 1 Bulk DBQueue insert -> W at line 1
- references source dbo.QBM_FGISessionContext source text reference
- references source dbo.QBM_PDBQueueInsert_Int source text reference
- references source dbo.QBM_PJournal source text reference
- references source dbo.QBM_PSessionContextSet source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
- queues DBQueue task W -> unresolved procedure QBM_PDBQueueInsert_Bulk (@UID_Task varchar(38) , @DBQueueElements QBM_YDBQueueRaw readonly , @Dummy_Sort_Order int = -1111 , @Dummy_no_Check_For_Existing int = -1111 ) as begin declare @PondGroup varchar(38) declare @DebugLevel char(1) = '…
References
- dbo.QBM_FGISessionContext
- dbo.QBM_PDBQueueInsert_Int
- dbo.QBM_PJournal
- dbo.QBM_PSessionContextSet
- dbo.QBM_PSessionErrorAdd
Referenced By
- dbo.QBM_FSQFKCheckFix
- dbo.QBM_FSQXDateSubItemUpdate
- dbo.QBM_FSQXMarkedForDeletionChg
- dbo.ADS_PAfterMigrationTasks
- dbo.ADS_ZAllForOneHardware
- dbo.ADS_ZAllForOneWorkDesk
- dbo.ADS_ZOrgHasADSGroup
- dbo.ADS_ZPersonHasADSGroup
- dbo.ADS_ZWorkDeskInADSGroup
- dbo.ATT_PAfterMigrationTasks
- dbo.ATT_ZAllForPersonInBaseTree
- dbo.ATT_ZAttestationCheck
- dbo.ATT_ZAttestationCheckValid
- dbo.ATT_ZAttestationReset
- dbo.ATT_ZAttHelperFill_Recalc
- dbo.CPL_PAfterMigrationTasks
- dbo.CPL_ZScheduleStartCheckRule
- dbo.CPL_ZScheduleStartFill
- dbo.LDP_PAfterMigrationTasks
- dbo.LDP_ZAllForOneHardware
- dbo.LDP_ZAllForOneWorkDesk
- dbo.LDP_ZOrgHasLDAPGroup
- dbo.LDP_ZPersonHasLDAPGroup
- dbo.LDP_ZWorkDeskInLDAPGroup
- dbo.POL_ZScheduleStart
- dbo.QBM_PDBQCS_CurrentRestore
- dbo.QBM_PDBQCS_SlotRunner
- dbo.QBM_PDBQueueCalculateDelta
- dbo.QBM_PDBQueueCompress
- dbo.QBM_PDBQueueInsert_Int
- dbo.QBM_PDBQueueInsert_Single
- dbo.QBM_PDeleteDeep_L
- dbo.QBM_PJobUpdateState_Bulk
- dbo.QBM_PScheduleCheck
- dbo.QBM_PTriggersInactiveForTable
- dbo.QBM_ZBufferTProcessModule
- dbo.QBM_ZBufferTProcessModulePU
- dbo.QBM_ZDBPrincipalCreate
- dbo.QBM_ZJobHistoryShrink
- dbo.QBM_ZPrePropColumn
- dbo.QBM_ZPrePropColumnFK
- dbo.QBM_ZPrePropDashBoardDef
- dbo.QBM_ZPrePropJobChain
- dbo.QBM_ZPrePropObject
- dbo.QBM_ZPrePropTable
- dbo.QBM_ZPreProptableFK
- dbo.QBM_ZPrePropTree
- dbo.QBM_ZPrePropTreeResult
- dbo.QBM_ZProcessChainStateUpdate
- dbo.QBM_ZProcessShrink
- dbo.QBM_ZProgressViewShrink
- dbo.QBM_ZRecalculate
- dbo.QBM_ZRITriggerCreate
- dbo.QBM_ZRITriggerPrepare
- dbo.QBM_ZScheduleStartDashBoard
- dbo.QBM_ZScheduleStartTask
- dbo.QBM_ZStateUTCOffset
- dbo.QBM_ZViewBuildAll
- dbo.QBM_ZWatchShrink
- dbo.QER_PAfterMigrationTasks
Complete Source
1CREATE PROCEDURE QBM_PDBQueueInsert_Bulk(2 @UID_Task varchar(38),3 @DBQueueElements QBM_YDBQueueRaw READONLY,4 @Dummy_Sort_Order int = -1111,5 @Dummy_no_Check_For_Existing int = -11116)7AS8BEGIN9 DECLARE @PondGroup varchar(38)10 DECLARE @DebugLevel char(1) = 'W'11 DECLARE @ErrorBuffer QBM_YSessionError12 SET XACT_ABORT OFF13 BEGIN TRY14 IF NOT EXISTS(15 SELECT TOP 1 116 FROM @DBQueueElements)17 BEGIN18 GOTO EndLabel19 END20 IF isnull(@Dummy_no_Check_For_Existing,21 0) <> -1111 OR isnull(@Dummy_Sort_Order,22 0) <> -111123 BEGIN24 SET XACT_ABORT25 ON26 RAISERROR('#LDS#Obsolete parameters used.|',27 18,28 1)29 WITH NOWAIT30 END31 IF dbo.QBM_FGISessionContext('TempQueue') > ' '32 BEGIN33 IF OBJECT_ID('tempdb..#QBMDBQueueTemp') IS NOT NULL34 BEGIN35 IF EXISTS(36 SELECT TOP 1 137 FROM QBMDBQueueTaskMetric f38 WITH(readpast)39 WHERE40 f.UID_Task = @UID_Task)41 BEGIN42 INSERT INTO #QBMDBQueueTemp(UID_Task,43 Object,44 SubObject,45 GenProcID)46 SELECT47 @UID_Task,48 e.Object,49 e.SubObject,50 e.GenProcID51 FROM @DBQueueElements e52 GOTO endLabel53 END54 ELSE55 BEGIN56 DELETE @ErrorBuffer57 INSERT INTO @ErrorBuffer(ErrorMessage,58 ErrorSeverity,59 ErrorState,60 ErrorNumber,61 ProcedureName,62 ProcedureLine,63 MessageDate,64 GenProcID,65 RepeatCounter,66 IsReThrow,67 SourceCode)68 SELECT69 CONCAT('#LDS#Internal error: no valid Task given ({0}).|',70 isnull(@UID_Task, '<empty>'),71 '|.'),72 18,73 1,74 50000,75 object_name(@@PROCID),76 ERROR_LINE(),77 GETUTCDATE(),78 NULL,79 0,80 0,81 NULL82 EXEC QBM_PSessionErrorAdd @ErrorBuffer83 SET XACT_ABORT84 ON85 RAISERROR('',86 18,87 1)88 WITH nowait89 END90 END91 ELSE92 BEGIN93 EXEC QBM_PJournal '#LDS#Internal error: SessionContext set, #QBMDBQueueTemp not existent.|',94 @@procid,95 'D',96 @DebugLevel97 END98 END99 SELECT @PondGroup = dbo.QBM_FGISessionContext('QBMDBQueuePond')100 IF @PondGroup > ' '101 BEGIN102 IF EXISTS(103 SELECT TOP 1 1104 FROM QBMDBQueueTaskMetric f105 WITH(readpast)106 WHERE107 f.UID_Task = @UID_Task)108 BEGIN109 INSERT INTO QBMDBQueuePond(UID_Task,110 Object,111 SubObject,112 GenProcID,113 PondGroup,114 InsertDate)115 SELECT116 @UID_Task,117 e.Object,118 e.SubObject,119 e.GenProcID,120 @PondGroup,121 GETUTCDATE()122 FROM @DBQueueElements e123 EXEC QBM_PSessionContextSet 'INSERTEDINTODBQUEUE',124 '1'125 GOTO endLabel126 END127 ELSE128 BEGIN129 DELETE @ErrorBuffer130 INSERT INTO @ErrorBuffer(ErrorMessage,131 ErrorSeverity,132 ErrorState,133 ErrorNumber,134 ProcedureName,135 ProcedureLine,136 MessageDate,137 GenProcID,138 RepeatCounter,139 IsReThrow,140 SourceCode)141 SELECT142 CONCAT('#LDS#Internal error: no valid Task given ({0}).|',143 isnull(@UID_Task, '<empty>'),144 '|.'),145 18,146 1,147 50000,148 object_name(@@PROCID),149 ERROR_LINE(),150 GETUTCDATE(),151 NULL,152 0,153 0,154 NULL155 EXEC QBM_PSessionErrorAdd @ErrorBuffer156 SET XACT_ABORT157 ON158 RAISERROR('',159 18,160 1)161 WITH nowait162 END163 END164 Standard:165 EXEC QBM_PDBQueueInsert_Int @UID_Task = @UID_Task,166 @DBQueueElements = @DBQueueElements167 END TRY168 BEGIN CATCH169 EXEC QBM_PSessionErrorAdd DEFAULT170 RAISERROR('',171 18,172 1)173 WITH NOWAIT174 END CATCH175 endLabel:176 RETURN177END
Open raw exported source
1create procedure QBM_PDBQueueInsert_Bulk (@UID_Task varchar(38) , @DBQueueElements QBM_YDBQueueRaw readonly , @Dummy_Sort_Order int = -1111 ,2 @Dummy_no_Check_For_Existing int = -1111 ) as begin declare @PondGroup varchar(38) declare @DebugLevel char(1) = 'W' declare @ErrorBuffer QBM_YSessionError3 SET XACT_ABORT OFF BEGIN TRY if not exists (select top 1 1 from @DBQueueElements ) begin goto EndLabel end if isnull(@Dummy_no_Check_For_Existing, 0) 4<> -1111 or isnull(@Dummy_Sort_Order, 0) <> -1111 begin set XACT_ABORT ON RAISERROR ('#LDS#Obsolete parameters used.|', 18, 1) WITH NOWAIT end if dbo.QBM_FGISessionContext5('TempQueue') > ' ' begin if OBJECT_ID('tempdb..#QBMDBQueueTemp') is not null begin if exists (select top 1 1 from QBMDBQueueTaskMetric f with (readpast6) where f.UID_Task = @UID_Task ) begin insert into #QBMDBQueueTemp(UID_Task, Object, SubObject, GenProcID) select @UID_Task, e.Object, e.SubObject, 7e.GenProcID from @DBQueueElements e goto endLabel end else begin delete @ErrorBuffer insert into @ErrorBuffer (ErrorMessage, ErrorSeverity, ErrorState,8 ErrorNumber , ProcedureName, ProcedureLine, MessageDate , GenProcID, RepeatCounter, IsReThrow, SourceCode) select concat('#LDS#Internal error: no valid Task given ({0}).|'9 , isnull(@UID_Task, '<empty>') , '|.' ),18, 1, 50000 , object_name(@@PROCID), ERROR_LINE(), GETUTCDATE() , null, 0, 0, null exec QBM_PSessionErrorAdd 10@ErrorBuffer set XACT_ABORT ON RAISERROR('', 18, 1) with nowait end end else begin exec QBM_PJournal '#LDS#Internal error: SessionContext set, #QBMDBQueueTemp not existent.|'11, @@procid, 'D', @DebugLevel end end select @PondGroup = dbo.QBM_FGISessionContext('QBMDBQueuePond') if @PondGroup > ' ' begin if exists (select top12 1 1 from QBMDBQueueTaskMetric f with (readpast) where f.UID_Task = @UID_Task ) begin insert into QBMDBQueuePond(UID_Task, Object, SubObject, GenProcID13, PondGroup, InsertDate) select @UID_Task, e.Object, e.SubObject, e.GenProcID, @PondGroup, GETUTCDATE() from @DBQueueElements e exec QBM_PSessionContextSet14 'INSERTEDINTODBQUEUE', '1' goto endLabel end else begin delete @ErrorBuffer insert into @ErrorBuffer (ErrorMessage, ErrorSeverity, ErrorState, ErrorNumber15 , ProcedureName, ProcedureLine, MessageDate , GenProcID, RepeatCounter, IsReThrow, SourceCode) select concat('#LDS#Internal error: no valid Task given ({0}).|'16 , isnull(@UID_Task, '<empty>') , '|.' ),18, 1, 50000 , object_name(@@PROCID), ERROR_LINE(), GETUTCDATE() , null, 0, 0, null exec QBM_PSessionErrorAdd 17@ErrorBuffer set XACT_ABORT ON RAISERROR('', 18, 1) with nowait end end Standard: exec QBM_PDBQueueInsert_Int @UID_Task = @UID_Task , @DBQueueElements18 = @DBQueueElements END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH endLabel: return end 19