Back to OIM Explorer

dbo.QBM_PNonlinear_SetFound

Stored ProcedureSQL_STORED_PROCEDURESandbox DB

Stored Procedure.

Source: sandbox-db sys.sql_modules

Source size: 1.223 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.QBM_PExecuteSQLWithRetry_LLP source text reference
  • references source dbo.QBM_PSessionErrorAdd source text reference

Complete Source

SQL54 lines
1CREATE PROCEDURE QBM_PNonlinear_SetFound2AS3BEGIN4  DECLARE @TableName varchar(30)5  DECLARE @DebugSwitch int = 06  DECLARE @Tablenames QBM_YCursorBuffer7  DECLARE @ElementCount int8  DECLARE @ElementIndex int9  DECLARE @Pattern nvarchar(max) = '10update 	@TableName@11	set XTouched = ''P''12	from  QBMNonLinearDepend x join  @TableName@ y on x.ObjectKeyOwner = y.XObjectKey1314'15  DECLARE @SQLCmd nvarchar(max)16  SET XACT_ABORT OFF17  BEGIN TRY18    INSERT INTO @Tablenames(Ident1)19    SELECT20      DISTINCT v.TableName21    FROM QBM_VNonlinearDeleteCandidates v22    SELECT @ElementCount = @@ROWCOUNT23    SELECT @ElementIndex = 124    WHILE @ElementIndex <= @ElementCount25    BEGIN26      SELECT TOP 1 @TableName = bu.Ident127      FROM @Tablenames bu28      WHERE29        bu.ElementIndex = @ElementIndex30      SELECT31        @SQLCmd = REPLACE(@Pattern,32        '@TableName@',33        @TableName)34      IF @DebugSwitch > 035      BEGIN36        print @sqlcmd37      END38      EXEC QBM_PExecuteSQLWithRetry_LLP @SQLStatement = @SQLCmd,39        @LockTimeout_ms = DEFAULT,40        @MaxWaitTimeForLock_s = 4.0,41        @ProcIDForJournal = DEFAULT,42        @HandleErrorSilent = 043      SELECT @ElementIndex += 144    END45  END TRY46  BEGIN CATCH47    EXEC QBM_PSessionErrorAdd DEFAULT48    DECLARE @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow()49    RAISERROR(@Rethrow,50    18,51    1)52      WITH NOWAIT53  END CATCH54END
Open raw exported source
SQL ยท Raw14 lines
1 create   procedure QBM_PNonlinear_SetFound as begin  declare @TableName varchar(30) declare @DebugSwitch int = 0 declare @Tablenames QBM_YCursorBuffer2 declare @ElementCount int declare @ElementIndex int declare @Pattern nvarchar(max) = '3update 	@TableName@4	set XTouched = ''P''5	from  QBMNonLinearDepend x join  @TableName@ y on x.ObjectKeyOwner = y.XObjectKey67'8 declare @SQLCmd nvarchar(max) SET XACT_ABORT OFF BEGIN TRY insert into @Tablenames(Ident1) select distinct v.TableName from QBM_VNonlinearDeleteCandidates9 v select @ElementCount = @@ROWCOUNT select @ElementIndex = 1 while @ElementIndex <= @ElementCount begin select top 1 @TableName = bu.Ident1 from @Tablenames10 bu where bu.ElementIndex = @ElementIndex select @SQLCmd = REPLACE(@Pattern, '@TableName@', @TableName) if @DebugSwitch > 0 begin print @sqlcmd end exec11 QBM_PExecuteSQLWithRetry_LLP @SQLStatement = @SQLCmd , @LockTimeout_ms = default , @MaxWaitTimeForLock_s = 4.0 , @ProcIDForJournal = default , @HandleErrorSilent12 = 0 select @ElementIndex += 1 end  END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow13() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH end 14