dbo.ADS_PAfterMigrationJobCreate
Stored ProcedureSQL_STORED_PROCEDURESandbox DB
Interpretation
- Database routine. Review parameters, called procedures, DBQueue inserts, and QBM_PJobCreate helper calls before assuming side effects.
- Object-layer bridge detected through QBM_PJobCreate helper usage.
Relations
- References QBM_PJobCreate*
Typed Edges
- references source dbo.QBM_FTHexPattern source text reference
- references source dbo.QBM_PJobCreate source text reference
- references source dbo.QBM_PJobCreate_HOTemplate source text reference
- references source dbo.QBM_PJobCreate_HOTemplate_B source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
References
- dbo.QBM_FTHexPattern
- dbo.QBM_PJobCreate
- dbo.QBM_PJobCreate_HOTemplate
- dbo.QBM_PJobCreate_HOTemplate_B
- dbo.QBM_PSessionErrorAdd
Referenced By
- No direct source references extracted.
Complete Source
1CREATE PROCEDURE ADS_PAfterMigrationJobCreate(2 @GenProcID varchar(38)3)4AS5BEGIN6 DECLARE @MyModule varchar(3) = 'ADS'7 SET XACT_ABORT OFF8 BEGIN TRY9 DECLARE @CountElements int10 DECLARE @Puffer QBM_YCursorbuffer11 DECLARE @ElementCount int12 DECLARE @ElementIndex int13 DECLARE @ElementLast int14 DECLARE @SQL nvarchar(max)15 DECLARE @Parameters QBM_YParameterList16 INSERT INTO @Parameters(Parameter1,17 ContentFull)18 VALUES('SQLStmt',19 @SQL),20 ('WithoutTransaction',21 'True')22 SELECT @CountElements = count(*)23 FROM ADSAccount u24 WHERE25 UID_Person IS NULL AND NeverConnectToPerson = 026 INSERT INTO @Puffer(ContentFull)27 SELECT28 CONCAT('exec QBM_PJobCreate_HOTemplate_B ''ADSAccount'', ''UID_Person is null and NeverConnectToPerson = 0 and UID_ADSAccount like '''''29 ,30 hp.HexPattern,31 ''''' '', @Columns = ''NeverConnectToPerson''',32 ',@GenProcID = ''',33 @Genprocid,34 '''',35 ', @AdditionalObjectKeysAffected = default')36 FROM dbo.QBM_FTHexPattern(CASE37 WHEN @CountElements > 20000000 THEN38 339 WHEN @CountElements > 3000000 THEN40 241 ELSE 142 END) AS hp43 SELECT @ElementCount = @@ROWCOUNT44 SELECT @ElementIndex = @@IDENTITY - @ElementCount +145 SELECT @ElementLast = @@IDENTITY46 WHILE @ElementIndex <= @ElementLast47 BEGIN48 SELECT TOP 1 @SQL = bu.ContentFull49 FROM @Puffer bu50 WHERE51 bu.ElementIndex = @ElementIndex52 UPDATE @Parameters53 SET ContentFull = @SQL54 WHERE55 Parameter1 = 'SQLStmt'56 EXEC QBM_PJobCreate 'VI.JobService.JobComponents.SQLComponent',57 'Execute SQL',58 @Parameters = @Parameters,59 @GenProcID = @Genprocid,60 @ObjectKeysAffected = DEFAULT61 SELECT @ElementIndex += 162 END63 SELECT @CountElements = count(*)64 FROM ADSContact u65 WHERE66 UID_Person IS NULL AND NeverConnectToPerson = 067 INSERT INTO @Puffer(ContentFull)68 SELECT69 CONCAT('exec QBM_PJobCreate_HOTemplate_B ''ADSContact'', ''UID_Person is null and NeverConnectToPerson = 0 and UID_ADSContact like '''''70 ,71 hp.HexPattern,72 ''''' '', @Columns = ''NeverConnectToPerson''',73 ',@GenProcID = ''',74 @Genprocid,75 '''',76 ', @AdditionalObjectKeysAffected = default')77 FROM dbo.QBM_FTHexPattern(CASE78 WHEN @CountElements > 20000000 THEN79 380 WHEN @CountElements > 3000000 THEN81 282 ELSE 183 END) AS hp84 SELECT @ElementCount = @@ROWCOUNT85 SELECT @ElementIndex = @@IDENTITY - @ElementCount +186 SELECT @ElementLast = @@IDENTITY87 WHILE @ElementIndex <= @ElementLast88 BEGIN89 SELECT TOP 1 @SQL = bu.ContentFull90 FROM @Puffer bu91 WHERE92 bu.ElementIndex = @ElementIndex93 UPDATE @Parameters94 SET ContentFull = @SQL95 WHERE96 Parameter1 = 'SQLStmt'97 EXEC QBM_PJobCreate 'VI.JobService.JobComponents.SQLComponent',98 'Execute SQL',99 @Parameters = @Parameters,100 @GenProcID = @Genprocid,101 @ObjectKeysAffected = DEFAULT102 SELECT @ElementIndex += 1103 END104 END TRY105 BEGIN CATCH106 EXEC QBM_PSessionErrorAdd DEFAULT107 RAISERROR('',108 18,109 1)110 WITH NOWAIT111 END CATCH112 endLabel:113 RETURN114END
Open raw exported source
1 create procedure ADS_PAfterMigrationJobCreate (@GenProcID varchar(38) ) as begin declare @MyModule varchar(3) = 'ADS' SET XACT_ABORT OFF BEGIN2 TRY declare @CountElements int declare @Puffer QBM_YCursorbuffer declare @ElementCount int declare @ElementIndex int declare @ElementLast int declare 3@SQL nvarchar(max) declare @Parameters QBM_YParameterList insert into @Parameters (Parameter1, ContentFull) values ('SQLStmt', @SQL) , ('WithoutTransaction'4, 'True') select @CountElements = count(*) from ADSAccount u where UID_Person is null and NeverConnectToPerson = 0 insert into @Puffer(ContentFull) select5 concat('exec QBM_PJobCreate_HOTemplate_B ''ADSAccount'', ''UID_Person is null and NeverConnectToPerson = 0 and UID_ADSAccount like ''''', hp.HexPattern6, ''''' '', @Columns = ''NeverConnectToPerson''' , ',@GenProcID = ''', @Genprocid, '''' , ', @AdditionalObjectKeysAffected = default' ) from dbo.QBM_FTHexPattern7( case when @CountElements > 20000000 then 3 when @CountElements > 3000000 then 2 else 1 end ) as hp select @ElementCount = @@ROWCOUNT select @ElementIndex8 = @@IDENTITY - @ElementCount +1 select @ElementLast = @@IDENTITY while @ElementIndex <= @ElementLast begin select top 1 @SQL = bu.ContentFull from @Puffer9 bu where bu.ElementIndex = @ElementIndex update @Parameters set ContentFull = @SQL where Parameter1 = 'SQLStmt' exec QBM_PJobCreate 'VI.JobService.JobComponents.SQLComponent'10 , 'Execute SQL' , @Parameters = @Parameters , @GenProcID = @Genprocid , @ObjectKeysAffected = default select @ElementIndex += 1 end select @CountElements11 = count(*) from ADSContact u where UID_Person is null and NeverConnectToPerson = 0 insert into @Puffer(ContentFull) select concat('exec QBM_PJobCreate_HOTemplate_B ''ADSContact'', ''UID_Person is null and NeverConnectToPerson = 0 and UID_ADSContact like '''''12, hp.HexPattern, ''''' '', @Columns = ''NeverConnectToPerson''' , ',@GenProcID = ''', @Genprocid, '''' , ', @AdditionalObjectKeysAffected = default' ) 13from dbo.QBM_FTHexPattern( case when @CountElements > 20000000 then 3 when @CountElements > 3000000 then 2 else 1 end ) as hp select @ElementCount = 14@@ROWCOUNT select @ElementIndex = @@IDENTITY - @ElementCount +1 select @ElementLast = @@IDENTITY while @ElementIndex <= @ElementLast begin select top 115 @SQL = bu.ContentFull from @Puffer bu where bu.ElementIndex = @ElementIndex update @Parameters set ContentFull = @SQL where Parameter1 = 'SQLStmt' exec16 QBM_PJobCreate 'VI.JobService.JobComponents.SQLComponent' , 'Execute SQL' , @Parameters = @Parameters , @GenProcID = @Genprocid , @ObjectKeysAffected 17= default select @ElementIndex += 1 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH endLabel: return18 end 19