Back to OIM Explorer

dbo.ATT_PAttestationHelperFill_i

Stored ProcedureSQL_STORED_PROCEDURESandbox DB

Stored Procedure.

Source: sandbox-db sys.sql_modules

Source size: 1.365 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.QBM_FGISessionErrorRethrow source text reference
  • references source dbo.ATT_PAttestationHelperFill source text reference
  • references source dbo.QBM_PSessionErrorAdd source text reference

Complete Source

SQL66 lines
1CREATE PROCEDURE ATT_PAttestationHelperFill_i(2  @SlotNumber int,3  @isNewDecisionLevel int4)5AS6BEGIN7  DECLARE @UID_AttestationCase varchar(38)8  DECLARE @GenProcID varchar(38)9  DECLARE @DebugLevel char(1) = 'W'10  DECLARE @ElementBuffer QBM_YCursorBuffer11  DECLARE @ElementCount int12  DECLARE @ElementIndex int13  DECLARE @DBQueueCurrent QBM_YDBQueueCurrent14  DECLARE @SQLCmdWithRetry nvarchar(max)15  SET XACT_ABORT OFF16  BEGIN TRY17    INSERT INTO @DBQueueCurrent(UID_DialogDBQueue,18    UID_Parameter,19    UID_SubParameter,20    GenProcID)21    SELECT22      UID_DialogDBQueue,23      UID_Parameter,24      UID_SubParameter,25      GenProcID26    FROM QBMDBQueueCurrent cu27      WITH(readpast)28    WHERE29      cu.SlotNumber = @SlotNumber30    IF @@rowcount = 031    BEGIN32      GOTO EndLabel33    END34    INSERT INTO @ElementBuffer(UID1,35    UID2)36    SELECT37      uid_parameter,38      GenprocID39    FROM @DBQueueCurrent p40    SELECT @ElementCount = @@ROWCOUNT41    SELECT @ElementIndex = 142    WHILE @ElementIndex <= @ElementCount43    BEGIN44      SELECT45        TOP 1 @UID_AttestationCase = bu.UID1,46        @GenProcID = bu.UID247      FROM @ElementBuffer bu48      WHERE49        bu.ElementIndex = @ElementIndex50      EXEC ATT_PAttestationHelperFill @UID_AttestationCase,51        @GenprocID,52        @isNewDecisionLevel = @isNewDecisionLevel53      SELECT @ElementIndex += 154    END55  END TRY56  BEGIN CATCH57    EXEC QBM_PSessionErrorAdd DEFAULT58    DECLARE @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow()59    RAISERROR(@Rethrow,60    18,61    1)62      WITH NOWAIT63  END CATCH64  endLabel:65  RETURN66END
Open raw exported source
SQL ยท Raw10 lines
1create   procedure ATT_PAttestationHelperFill_i (@SlotNumber int , @isNewDecisionLevel int ) as begin  declare @UID_AttestationCase varchar(38) 2declare @GenProcID varchar(38) declare @DebugLevel char(1) = 'W' declare @ElementBuffer QBM_YCursorBuffer declare @ElementCount int declare @ElementIndex3 int declare @DBQueueCurrent QBM_YDBQueueCurrent declare @SQLCmdWithRetry nvarchar(max) SET XACT_ABORT OFF BEGIN TRY insert into @DBQueueCurrent(UID_DialogDBQueue4, UID_Parameter, UID_SubParameter, GenProcID) select UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID from QBMDBQueueCurrent cu with (readpast5) where cu.SlotNumber = @SlotNumber if @@rowcount = 0 begin goto EndLabel end insert into @ElementBuffer (UID1, UID2) select uid_parameter, GenprocID from6 @DBQueueCurrent p select @ElementCount = @@ROWCOUNT select @ElementIndex = 1 while @ElementIndex <= @ElementCount begin select top 1 @UID_AttestationCase7 = bu.UID1 , @GenProcID = bu.UID2 from @ElementBuffer bu where bu.ElementIndex = @ElementIndex exec ATT_PAttestationHelperFill @UID_AttestationCase, @GenprocID8, @isNewDecisionLevel = @isNewDecisionLevel select @ElementIndex += 1 end  END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default declare @Rethrow varchar9(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH endLabel: return end 10