dbo.LDP_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 LDP_PAfterMigrationJobCreate(2 @GenProcID varchar(38)3)4AS5BEGIN6 DECLARE @MyModule varchar(3) = 'LDP'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 LDAPAccount u24 WHERE25 UID_Person IS NULL AND NeverConnectToPerson = 026 INSERT INTO @Puffer(ContentFull)27 SELECT28 CONCAT('exec QBM_PJobCreate_HOTemplate_B ''LDAPAccount'', ''UID_Person is null and NeverConnectToPerson = 0 and UID_LDAPAccount 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 END TRY64 BEGIN CATCH65 EXEC QBM_PSessionErrorAdd DEFAULT66 RAISERROR('',67 18,68 1)69 WITH NOWAIT70 END CATCH71 endLabel:72 RETURN73END
Open raw exported source
1 create procedure LDP_PAfterMigrationJobCreate (@GenProcID varchar(38) ) as begin declare @MyModule varchar(3) = 'LDP' 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 LDAPAccount u where UID_Person is null and NeverConnectToPerson = 0 insert into @Puffer(ContentFull) select5 concat('exec QBM_PJobCreate_HOTemplate_B ''LDAPAccount'', ''UID_Person is null and NeverConnectToPerson = 0 and UID_LDAPAccount 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 END TRY BEGIN CATCH11 exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH endLabel: return end 12