dbo.DPR_PSlotResetWhileProj_L
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.DPR_FTProjectionRootRunning source text reference
- references source dbo.QBM_FGIDBQueueSlotResetType source text reference
- references source dbo.QBM_FGISessionErrorRethrow source text reference
- references source dbo.QBM_PDBQCS_CurrentMoveSlot source text reference
- references source dbo.QBM_PJournal source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
References
- dbo.DPR_FTProjectionRootRunning
- dbo.QBM_FGIDBQueueSlotResetType
- dbo.QBM_FGISessionErrorRethrow
- dbo.QBM_PDBQCS_CurrentMoveSlot
- dbo.QBM_PJournal
- dbo.QBM_PSessionErrorAdd
Referenced By
- dbo.ADS_RAccountInADSGroup
- dbo.ADS_RADSMachineInADSGroup
- dbo.ADS_RContactInADSGroup
- dbo.ADS_RGroupInADSGroup
- dbo.ADS_ZAccountInADSGroup
- dbo.ADS_ZADSMachineInADSGroup
- dbo.ADS_ZContactInADSGroup
- dbo.LDP_RAccountInLDAPGroup
- dbo.LDP_RLDPMachineInLDAPGroup
- dbo.LDP_ZAccountInLDAPGroup
- dbo.LDP_ZLDPMachineInLDAPGroup
- dbo.TSB_RUNSAccountBHasUNSItemB
- dbo.TSB_RUNSAccountBInUNSGroupB
- dbo.TSB_RUNSAccountBInUNSGroupB1
- dbo.TSB_RUNSAccountBInUNSGroupB2
- dbo.TSB_RUNSAccountBInUNSGroupB3
- dbo.TSB_RUNSGroupB1InUNSGroupB1
- dbo.TSB_RUNSGroupB2InUNSGroupB2
- dbo.TSB_RUNSGroupB3InUNSGroupB3
- dbo.TSB_RUNSGroupBHasUNSItemB
- dbo.TSB_RUNSGroupBInUNSGroupB
Complete Source
1CREATE PROCEDURE DPR_PSlotResetWhileProj_L(2 @DBQueueCurrent QBM_YDBQueueCurrent READONLY,3 @ObjectKeysToCheck QBM_YParameterList READONLY,4 @Operation varchar(38),5 @SlotNumber int6)7AS8BEGIN9 DECLARE @erg int = 010 DECLARE @msg nvarchar(1000)11 DECLARE @DebugLevel varchar(1) = 'W'12 DECLARE @SuppressCount int = 3013 DECLARE @RunningSyncs QBM_YParameterList14 DECLARE @SlotNumberSource int15 DECLARE @SlotNumberTarget int16 DECLARE @DBQueueToMove QBM_YDBQCSCurrentToMove17 DECLARE @RowsMoved int18 SET XACT_ABORT OFF19 BEGIN TRY20 INSERT INTO @RunningSyncs(Parameter1,21 Parameter2)22 SELECT23 o.ObjectKeyRoot,24 o.BaseTableName25 FROM dbo.DPR_FTProjectionRootRunning() o26 IF EXISTS(27 SELECT TOP 1 128 FROM @DBQueueCurrent cu29 JOIN @ObjectKeysToCheck oc30 ON cu.UID_Parameter = oc.Parameter131 JOIN @RunningSyncs r32 ON r.Parameter1 = oc.Parameter2)33 BEGIN34 INSERT INTO @DBQueueToMove(UID_DialogDBQueue)35 SELECT cul.UID_DialogDBQueue36 FROM @DBQueueCurrent cul37 JOIN @ObjectKeysToCheck oc38 ON cul.UID_Parameter = oc.Parameter139 JOIN @RunningSyncs r40 ON r.Parameter1 = oc.Parameter241 SELECT @erg = @@rowcount42 IF @erg > 043 BEGIN44 SELECT @SlotNumberSource = @SlotNumber45 SELECT @SlotnumberTarget = dbo.QBM_FGIDBQueueSlotResetType('Sync')46 EXEC @RowsMoved = QBM_PDBQCS_CurrentMoveSlot @DBQueueToMove,47 @SlotNumberSource,48 @SlotnumberTarget49 SELECT50 @msg = '#LDS#Resetting operations {0} because Projection processes are still running for this element.|' + @Operation + '|'51 EXEC dbo.QBM_PJournal @msg,52 @@PROCID,53 'W',54 @DebugLevel,55 @SuppressCount56 END57 END58 END TRY59 BEGIN CATCH60 EXEC QBM_PSessionErrorAdd DEFAULT61 DECLARE @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow()62 RAISERROR(@Rethrow,63 18,64 1)65 WITH NOWAIT66 END CATCH67 ende:68 RETURN(@erg)69END
Open raw exported source
1 create procedure DPR_PSlotResetWhileProj_L ( @DBQueueCurrent QBM_YDBQueueCurrent readonly , @ObjectKeysToCheck QBM_YParameterList readonly 2, @Operation varchar(38) , @SlotNumber int ) as begin declare @erg int = 0 declare @msg nvarchar(1000) declare @DebugLevel varchar(1) = 'W' declare @SuppressCount3 int = 30 declare @RunningSyncs QBM_YParameterList declare @SlotNumberSource int declare @SlotNumberTarget int declare @DBQueueToMove QBM_YDBQCSCurrentToMove4 declare @RowsMoved int SET XACT_ABORT OFF BEGIN TRY insert into @RunningSyncs (Parameter1, Parameter2) select o.ObjectKeyRoot, o.BaseTableName from dbo.DPR_FTProjectionRootRunning5() o if exists (select top 1 1 from @DBQueueCurrent cu join @ObjectKeysToCheck oc on cu.UID_Parameter = oc.Parameter1 join @RunningSyncs r on r.Parameter16 = oc.Parameter2 ) begin insert into @DBQueueToMove(UID_DialogDBQueue) select cul.UID_DialogDBQueue from @DBQueueCurrent cul join @ObjectKeysToCheck 7oc on cul.UID_Parameter = oc.Parameter1 join @RunningSyncs r on r.Parameter1 = oc.Parameter2 select @erg = @@rowcount if @erg > 0 begin select @SlotNumberSource8 = @SlotNumber select @SlotnumberTarget = dbo.QBM_FGIDBQueueSlotResetType( 'Sync') exec @RowsMoved = QBM_PDBQCS_CurrentMoveSlot @DBQueueToMove, @SlotNumberSource9, @SlotnumberTarget select @msg = '#LDS#Resetting operations {0} because Projection processes are still running for this element.|' + @Operation + '|' 10exec dbo.QBM_PJournal @msg, @@PROCID, 'W', @DebugLevel, @SuppressCount end end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default declare @Rethrow varchar11(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH ende: return (@erg) end 12