dbo.QBM_ZScheduleStartJob
Stored ProcedureSQL_STORED_PROCEDURESandbox DB
Interpretation
- Database routine. Review parameters, called procedures, DBQueue inserts, and QBM_PJobCreate helper calls before assuming side effects.
Relations
- No extracted relations.
Typed Edges
- references source dbo.QBM_PScheduleStartJob source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
- references source dbo.QBM_ZScheduleStart source text reference
References
Referenced By
- No direct source references extracted.
Complete Source
1CREATE PROCEDURE QBM_ZScheduleStartJob(2 @SlotNumber int3)4AS5BEGIN6 DECLARE @Name nvarchar(255)7 DECLARE @MessageString nvarchar(1024)8 DECLARE @GenProcID varchar(38)9 DECLARE @HostName nvarchar(64)10 DECLARE @uid_JobAutoStart varchar(38)11 DECLARE @MyName nvarchar(64) = object_name(@@procid)12 DECLARE @ElementBuffer QBM_YCursorBuffer13 DECLARE @ElementCount int14 DECLARE @ElementIndex int15 BEGIN TRY16 INSERT INTO @ElementBuffer(UID1)17 SELECT ja.UID_JobAutoStart18 FROM JobAutoStart ja19 JOIN QBMDBQueueCurrent cu20 WITH(readpast)21 ON ja.UID_DialogSchedule = cu.UID_Parameter22 WHERE23 cu.SlotNumber = @SlotNumber24 SELECT @ElementCount = @@ROWCOUNT25 SELECT @ElementIndex = 126 WHILE @ElementIndex <= @ElementCount27 BEGIN28 SELECT TOP 1 @UID_JobAutoStart = bu.UID129 FROM @ElementBuffer bu30 WHERE31 bu.ElementIndex = @ElementIndex32 EXEC QBM_PScheduleStartJob @uid_JobAutoStart33 SELECT @ElementIndex += 134 END35 END TRY36 BEGIN CATCH37 EXEC QBM_PSessionErrorAdd DEFAULT38 RAISERROR('',39 18,40 1)41 WITH NOWAIT42 END CATCH43 ende:44 RETURN45END
Open raw exported source
1 create procedure QBM_ZScheduleStartJob (@SlotNumber int ) AS begin declare @Name nvarchar(255) declare @MessageString nvarchar(1024) declare2 @GenProcID varchar(38) declare @HostName nvarchar(64) declare @uid_JobAutoStart varchar(38) declare @MyName nvarchar(64) = object_name(@@procid) declare3 @ElementBuffer QBM_YCursorBuffer declare @ElementCount int declare @ElementIndex int BEGIN TRY insert into @ElementBuffer (UID1) select ja.UID_JobAutoStart4 from JobAutoStart ja join QBMDBQueueCurrent cu with (readpast) on ja.UID_DialogSchedule = cu.UID_Parameter where cu.SlotNumber = @SlotNumber select @ElementCount5 = @@ROWCOUNT select @ElementIndex = 1 while @ElementIndex <= @ElementCount begin select top 1 @UID_JobAutoStart = bu.UID1 from @ElementBuffer bu where6 bu.ElementIndex = @ElementIndex exec QBM_PScheduleStartJob @uid_JobAutoStart select @ElementIndex += 1 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd7 default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 8