Back to OIM Explorer

dbo.ADS_RGroupInADSGroup

Stored ProcedureSQL_STORED_PROCEDURESandbox DB

Stored Procedure.

Source: sandbox-db sys.sql_modules

Source size: 1.563 characters

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_FGIProjectionRootRunning source text reference
  • references source dbo.DPR_PSlotResetWhileProj_L source text reference
  • references source dbo.QBM_PSessionErrorAdd source text reference
  • references source dbo.QBM_PSlotResetOnMissingItem_L source text reference

Complete Source

SQL73 lines
1CREATE PROCEDURE ADS_RGroupInADSGroup(2  @SlotNumber int3)4AS5BEGIN6  DECLARE @ObjectKeysToCheck_Projection QBM_YParameterList7  DECLARE @ObjectKeysToCheck_Jobrunning QBM_YParameterList8  DECLARE @MyName nvarchar(64) = object_name(@@procid)9  DECLARE @DBQueueCurrent QBM_YDBQueueCurrent10  DECLARE @resetted int11  BEGIN TRY12    INSERT INTO @DBQueueCurrent(UID_DialogDBQueue,13    UID_Parameter,14    UID_SubParameter,15    GenProcID)16    SELECT17      UID_DialogDBQueue,18      UID_Parameter,19      UID_SubParameter,20      GenProcID21    FROM QBMDBQueueCurrent cu22      WITH(readpast)23    WHERE24      cu.SlotNumber = @SlotNumber25    IF @@rowcount = 026    BEGIN27      GOTO EndLabel28    END29    EXEC @resetted = QBM_PSlotResetOnMissingItem_L @DBQueueCurrent,30    'ADSGroup',31    'uid_ADSGroup',32      @SlotNumber33    IF @resetted > 034    BEGIN35      DELETE @DBQueueCurrent36      FROM @DBQueueCurrent v37      LEFT38      OUTER39      JOIN QBMDBQueueCurrent cu40        WITH(readpast)41        ON v.UID_DialogDBQueue = cu.UID_DialogDBQueue AND cu.SlotNumber = @SlotNumber42      WHERE43        cu.UID_DialogDBQueue IS NULL44    END45    IF 1 = dbo.DPR_FGIProjectionRootRunning('ADSDomain')46    BEGIN47      INSERT INTO @ObjectKeysToCheck_Projection(Parameter1,48      Parameter2)49      SELECT50        cu.UID_Parameter,51        ro.ObjectKeyRoot52      FROM QBMDBQueueCurrent cu53      JOIN ADSGroup x54        ON cu.UID_Parameter = x.UID_ADSGroup55      JOIN ADS_VElementAndRoot ro56        ON x.XObjectKey = ro.ObjectKeyElement57      WHERE58        ro.ElementTable = 'ADSGroup' AND cu.SlotNumber = @SlotNumber59      EXEC @resetted = DPR_PSlotResetWhileProj_L @DBQueueCurrent,60        @ObjectKeysToCheck_Projection,61        @MyName,62        @SlotNumber63    END64  END TRY65  BEGIN CATCH66    EXEC QBM_PSessionErrorAdd DEFAULT67    RAISERROR('',68    18,69    1)70      WITH NOWAIT71  END CATCH72  endLabel:73END
Open raw exported source
SQL ยท Raw11 lines
1create   procedure ADS_RGroupInADSGroup (@SlotNumber int) AS begin declare @ObjectKeysToCheck_Projection QBM_YParameterList declare @ObjectKeysToCheck_Jobrunning2 QBM_YParameterList declare @MyName nvarchar(64) = object_name(@@procid) declare @DBQueueCurrent QBM_YDBQueueCurrent declare @resetted int BEGIN TRY insert3 into @DBQueueCurrent(UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID) select UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID4 from QBMDBQueueCurrent cu with (readpast) where cu.SlotNumber = @SlotNumber if @@rowcount = 0 begin goto EndLabel end  exec @resetted = QBM_PSlotResetOnMissingItem_L5 @DBQueueCurrent, 'ADSGroup', 'uid_ADSGroup', @SlotNumber if @resetted > 0 begin delete  @DBQueueCurrent from @DBQueueCurrent v left outer join QBMDBQueueCurrent6 cu with (readpast) on v.UID_DialogDBQueue = cu.UID_DialogDBQueue and cu.SlotNumber = @SlotNumber where cu.UID_DialogDBQueue is null end if 1 = dbo.DPR_FGIProjectionRootRunning7 ('ADSDomain') begin insert into @ObjectKeysToCheck_Projection(Parameter1, Parameter2) select cu.UID_Parameter, ro.ObjectKeyRoot from QBMDBQueueCurrent8 cu join ADSGroup x on cu.UID_Parameter = x.UID_ADSGroup join ADS_VElementAndRoot ro on x.XObjectKey = ro.ObjectKeyElement  where ro.ElementTable = 'ADSGroup'9 and cu.SlotNumber = @SlotNumber exec @resetted = DPR_PSlotResetWhileProj_L @DBQueueCurrent, @ObjectKeysToCheck_Projection, @MyName, @SlotNumber  end END10 TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH endLabel: end 11