dbo.QER_ZPersonFindGenerateFunct
SQL_STORED_PROCEDURE
Created 2025-06-27T18:01:07.573 · modified 2026-04-14T23:20:40.393 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
@SlotNumberDummy | int | no |
@dummy1 | varchar | no |
@dummy2 | varchar | no |
@dummyGenProcID | varchar | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| QBM_PDBQueueCurrentResetNGen | OBJECT_OR_COLUMN | ||
| QBM_PExecuteSQLWithRetry_LLP | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_VQBMRelation | OBJECT_OR_COLUMN | ||
| QBMModuleDef | OBJECT_OR_COLUMN | ||
| dbo | QBM_FCVGUIDToModuleOwner | OBJECT_OR_COLUMN | |
| dbo | QBM_FCVStringToList_i | OBJECT_OR_COLUMN | |
| dbo | QBM_FGIConfigparmValue | OBJECT_OR_COLUMN | |
| dbo | QBM_FGIDBOwner | OBJECT_OR_COLUMN | |
| dbo | QBM_FSQRemoveComment_i | OBJECT_OR_COLUMN |
Source excerpt
First extracted SQL definition lines from the exported source. Use the full source page for complete context.
1 create procedure QER_ZPersonFindGenerateFunct (@SlotNumberDummy int , @dummy1 varchar(38) , @dummy2 varchar(38) , @dummyGenProcID varchar(38 2) ) as begin declare @DisabledBy varchar(1024) = dbo.QBM_FGIConfigparmValue('QER\Person\PasswordResetAuthenticator\DisabledBy') declare @EnabledBy varchar 3(1024) = dbo.QBM_FGIConfigparmValue('QER\Person\PasswordResetAuthenticator\EnabledBy') declare @SearchColumn varchar(1024) = dbo.QBM_FGIConfigparmValue 4('QER\Person\PasswordResetAuthenticator\SearchColumn') declare @SearchTable varchar(30) = dbo.QBM_FGIConfigparmValue('QER\Person\PasswordResetAuthenticator\SearchTable' 5) declare @DisabledConverted nvarchar(max) declare @EnabledConverted nvarchar(max) declare @PersonColumnName varchar(30) declare @FunctionName varchar(30 6) = 'QER_FTPersonFindByTSProp' declare @FunctionBody nvarchar(max) declare @header nvarchar(max) = 'create or alter function dbo.QER_FTPersonFindByTSProp( @CompareValue nvarchar(400) 7 ) 8 returns @erg table (UID_Person varchar(38) 9 ) 10as 11begin 12 insert into @erg(UID_Person) 13' 14 declare @footer nvarchar(max) = ' 15 16return 17 18end 19 20' declare @DebugSwitch int = 0 declare @ResetMessage nvarchar(4000) BEGIN TRY if @DebugSwitch > 210 begin select @SearchColumn = 'cn|DistinguishedName|GivenName' select @SearchTable = 'ADSAccount' select @DisabledBy = 'AllowDialIn|IsGroupAccount' 22 end select top 1 @PersonColumnName = r.ChildColumn from QBM_VQBMRelation r join QBMModuleDef d on dbo.QBM_FCVGUIDToModuleOwner(r.UID_QBMRelation) = 23 d.ModuleName where r.ChildTable = @SearchTable and r.ParentTable = 'Person' order by d.SortOrder asc if @SearchTable = 'Person' begin select @PersonColumnName 24 = 'UID_Person' end select @DisabledConverted = concat(' 25 -- disabled 26 and ' , replace(@DisabledBy, '|', ' = 0 and ') , ' = 0' ) select @EnabledConverted 27 = concat(' 28 -- enabled 29 and ' , replace(@EnabledBy, '|', ' = 1 and ') , ' = 1' ) if @SearchColumn > ' ' and @SearchTable > ' ' begin select @FunctionBody 30 = concat( @header, ' 31 select ', @PersonColumnName , ' 32 from ', @SearchTable , ' 33 where ', ( select concat( '(', String_agg(concat(s.Parameter1 , 34' = @CompareValue ') , ' or '), ')' ) from dbo.QBM_FCVStringToList_i(@SearchColumn, '|', 1, 0, '') s ), ' 35 ', case when @EnabledBy > ' ' then @EnabledConverted 36 else '' end , case when @DisabledBy > ' ' then @DisabledConverted else '' end , @footer ) end else begin select @FunctionBody = concat(@header, ' select p.UID_Person 37 from Person p 38 where p.CentralAccount = @CompareValue 39 40 ' 41, @footer ) end if @DebugSwitch > 0 begin print @functionbody end BEGIN TRY if dbo.QBM_FGIDBOwner() = 'CCC' begin select @FunctionBody = dbo.QBM_FSQRemoveComment_i 42(@FunctionBody, 1) end exec QBM_PExecuteSQLWithRetry_LLP @SQLStatement = @FunctionBody , @LockTimeout_ms = default , @MaxWaitTimeForLock_s = default , 43@ProcIDForJournal = default , @HandleErrorSilent = 0 , @ExecuteWithTransact = 0 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default select @ResetMessage 44 = ERROR_MESSAGE() if @@TRANCOUNT > 0 begin rollback end exec QBM_PDBQueueCurrentResetNGen @SlotNumberDummy , @ResetMessage , @@PROCID END CATCH END TRY 45 BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 46
Module relation graph
Loading module relation graph…
Source-derived context
Generated from exported SQL module definitions plus read-only sandbox sys.objects/sys.parameters/sys.sql_expression_dependencies metadata. This is factual source evidence, not a semantic guess.
provenance: SQL definition export provenance: sandbox DB metadata modified: 2026-04-14T23:20:40.393
has TRY/CATCH error handling
Summary: calls QBM_PExecuteSQLWithRetry_LLP, QBM_PSessionErrorAdd, QBM_PDBQueueCurrentResetNGen; writes INSERT into; reads/joins QBM_VQBMRelation, QBMModuleDef, QBM_FCVStringToList_i, Person; uses config QER\Person\PasswordResetAuthenticator\DisabledBy, QER\Person\PasswordResetAuthenticator\EnabledBy, QER\Person\PasswordResetAuthenticator\SearchColumn…
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@SlotNumberDummy | int | input |
@dummy1 | varchar(38) | input |
@dummy2 | varchar(38) | input |
@dummyGenProcID | varchar(38) | input |
DML targets
INSERT intoRead/join references
SQL dependency metadata
Config/session
Config: QER\Person\PasswordResetAuthenticator\DisabledBy QER\Person\PasswordResetAuthenticator\EnabledBy QER\Person\PasswordResetAuthenticator\SearchColumn QER\Person\PasswordResetAuthenticator\SearchTable
Session: None extracted.
DBQueue/tasks
None extracted.Temp tables / referenced variables
Temp: None extracted.
Variables: @SlotNumberDummy @dummy1 @dummy2 @dummyGenProcID @DisabledBy @EnabledBy @SearchColumn @SearchTable @DisabledConverted @EnabledConverted @PersonColumnName @FunctionName @FunctionBody @header @CompareValue @erg @footer @DebugSwitch @ResetMessage @functionbody @SQLStatement @LockTimeout_ms @MaxWaitTimeForLock_s @ProcIDForJournal @HandleErrorSilent @ExecuteWithTransact @TRANCOUNT @PROCID
Referenced by / reverse dependencies
Generated from live DB metadata, FK rows, and exported SQL dependency/source extraction. This is factual linkage evidence, not inferred behavior.
No reverse dependencies extracted.