dbo.QBM_PNonlinear_DeleteUntouched
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_FGISessionErrorRethrow source text reference
- references source dbo.QBM_PExecuteSQLWithRetry_LLP source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
References
Referenced By
- No direct source references extracted.
Complete Source
1CREATE PROCEDURE QBM_PNonlinear_DeleteUntouched2AS3BEGIN4 DECLARE @TableName varchar(30)5 DECLARE @DebugSwitch int = 06 DECLARE @Pattern nvarchar(max) = '7delete /* algorithmisch notwendig */ @TableName@8--select Xtouched, XObjectKey9 from @TableName@10 where XTouched = ''O''1112'13 DECLARE @SQLCmd nvarchar(max)14 DECLARE @Tablenames QBM_YCursorBuffer15 DECLARE @ElementCount int16 DECLARE @ElementIndex int17 SET XACT_ABORT OFF18 BEGIN TRY19 INSERT INTO @Tablenames(Ident1)20 SELECT21 DISTINCT v.TableName22 FROM QBM_VNonlinearDeleteCandidates v23 SELECT @ElementCount = @@ROWCOUNT24 SELECT @ElementIndex = 125 WHILE @ElementIndex <= @ElementCount26 BEGIN27 SELECT TOP 1 @TableName = bu.Ident128 FROM @Tablenames bu29 WHERE30 bu.ElementIndex = @ElementIndex31 SELECT32 @SQLCmd = REPLACE(@Pattern,33 '@TableName@',34 @TableName)35 IF @DebugSwitch > 036 BEGIN37 print @sqlcmd38 END39 EXEC QBM_PExecuteSQLWithRetry_LLP @SQLStatement = @SQLCmd,40 @LockTimeout_ms = DEFAULT,41 @MaxWaitTimeForLock_s = 4.0,42 @ProcIDForJournal = DEFAULT,43 @HandleErrorSilent = 044 SELECT @ElementIndex += 145 END46 END TRY47 BEGIN CATCH48 EXEC QBM_PSessionErrorAdd DEFAULT49 DECLARE @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow()50 RAISERROR(@Rethrow,51 18,52 1)53 WITH NOWAIT54 END CATCH55END
Open raw exported source
1 create procedure QBM_PNonlinear_DeleteUntouched as begin declare @TableName varchar(30) declare @DebugSwitch int = 0 declare @Pattern nvarchar2(max) = '3delete /* algorithmisch notwendig */ @TableName@4--select Xtouched, XObjectKey5 from @TableName@6 where XTouched = ''O''78' declare @SQLCmd9 nvarchar(max) declare @Tablenames QBM_YCursorBuffer declare @ElementCount int declare @ElementIndex int SET XACT_ABORT OFF BEGIN TRY insert into @Tablenames10(Ident1) select distinct v.TableName from QBM_VNonlinearDeleteCandidates v select @ElementCount = @@ROWCOUNT select @ElementIndex = 1 while @ElementIndex11 <= @ElementCount begin select top 1 @TableName = bu.Ident1 from @Tablenames bu where bu.ElementIndex = @ElementIndex select @SQLCmd = REPLACE(@Pattern12, '@TableName@', @TableName) if @DebugSwitch > 0 begin print @sqlcmd end exec QBM_PExecuteSQLWithRetry_LLP @SQLStatement = @SQLCmd , @LockTimeout_ms = 13default , @MaxWaitTimeForLock_s = 4.0 , @ProcIDForJournal = default , @HandleErrorSilent = 0 select @ElementIndex += 1 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd14 default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH end 15