dbo.QBM_ZGetServerProperties

SQL_STORED_PROCEDURE

Created 2025-06-27T17:58:59.313 · modified 2026-04-14T23:20:30.180 · source: live DB sys.objects/sys.sql_expression_dependencies.

Open formatted source/search result

Parameters

NameTypeOutput
@SlotNumberDummyintno
@Dummy1varcharno
@Dummy2varcharno
@DummyGenProcidvarcharno

Referenced objects

SchemaObjectColumn/minorClass
DialogConfigParmOBJECT_OR_COLUMN
QBM_PSessionErrorAddOBJECT_OR_COLUMN
QBM_VServerEnginePropertiesOBJECT_OR_COLUMN
dboQBM_FCVIntToStringOBJECT_OR_COLUMN
dboQBM_FCVStringToDigitsOBJECT_OR_COLUMN
dboQBM_FCVStringToIntOBJECT_OR_COLUMN
dboQBM_FGIDBOwnerOBJECT_OR_COLUMN

Source excerpt

First extracted SQL definition lines from the exported source. Use the full source page for complete context.

Open full formatted source

1       create   procedure QBM_ZGetServerProperties (@SlotNumberDummy int = 0 , @Dummy1 varchar(38) = '' , @Dummy2 varchar(38) = '' , @DummyGenProcid
2 varchar(38) = '' ) as begin declare @MessageString nvarchar(max) declare @x table (LogDate datetime , ProcessInfo nvarchar(256) collate database_default
3 , MessageString nvarchar(max) ) declare @CountSockets int declare @CountCoresPerSocket int declare @CountLogicalProcessorsPerSocket int declare @CountCoresTotal
4 int declare @CountLogicalProcessorsTotal int declare @CoreDetect int declare @patIndex nvarchar(64) declare @DebugSwitch int = 0 declare @IsQBMMaster 
5bit = 0 declare @BlindMuster varchar(16) = '0' declare @CURRENT_TIMEZONE_ID varchar(50) = null  declare @XUser nvarchar(64) = object_name(@@procid) declare
6 @Xdate datetime = getutcdate() declare @HasExtendedProc bit BEGIN TRY select top 1 @HasExtendedProc = p.HasExtendedProc from QBM_VServerEngineProperties
7 p if dbo.QBM_FGIDBOwner() = 'QBM' begin select @IsQBMMaster = 1 end if @HasExtendedProc = 0  begin select @CoreDetect = 0 end else begin insert into @x
8(LogDate, ProcessInfo, MessageString) EXEC sys.xp_readerrorlog 0, 1, N'detected', N'socket' select @CoreDetect = @@ROWCOUNT end if @CoreDetect = 0 begin
9  select @CountLogicalProcessorsPerSocket = COUNT(*) FROM sys.dm_os_schedulers WHERE status = N'VISIBLE ONLINE'; SELECT top 1 cpu_count, ceiling(convert
10(float, cpu_count)/convert(float,hyperthread_ratio)) AS CountSockets , hyperthread_ratio AS CountCoresPerSocket , cpu_count AS CountCoresTotal FROM sys.dm_os_sys_info
11 end else begin select top 1 @MessageString = x.MessageString from @x x order by x.LogDate desc if @DebugSwitch > 0 begin print @MessageString end select
12 @patIndex = '%detected % sockets%' select @CountSockets = dbo.QBM_FCVStringToInt( dbo.QBM_FCVStringToDigits( substring(@MessageString, patindex(@patIndex
13, @MessageString) , len(@patIndex))), 0) select @patIndex = '%with % cores per socket%' select @CountCoresPerSocket = dbo.QBM_FCVStringToInt( dbo.QBM_FCVStringToDigits
14( substring(@MessageString, patindex(@patIndex, @MessageString) , len(@patIndex))), 0) select @patIndex = '%and % logical processors per s%' select @CountLogicalProcessorsPerSocket
15 = dbo.QBM_FCVStringToInt( dbo.QBM_FCVStringToDigits( substring(@MessageString, patindex(@patIndex, @MessageString) , len(@patIndex))), 0) select @CountCoresTotal
16 = @CountSockets * @CountCoresPerSocket end select @CountLogicalProcessorsTotal = @CountSockets * @CountLogicalProcessorsPerSocket            select @CURRENT_TIMEZONE_ID
17 = convert(varchar(50), CURRENT_TIMEZONE_ID())  if @CURRENT_TIMEZONE_ID is null begin select @CURRENT_TIMEZONE_ID = CURRENT_TIMEZONE()  end if @DebugSwitch
18 > 0 begin print '@CountSockets' + str(@CountSockets) print '@CountCoresPerSocket' + str(@CountCoresPerSocket) print '@CountLogicalProcessorsPerSocket'
19 + str(@CountLogicalProcessorsPerSocket) print '@CountCoresTotal' + str(@CountCoresTotal) print '@CountLogicalProcessorsTotal' + str(@CountLogicalProcessorsTotal
20) print '@TimeZoneInformation (ID) ' + @CURRENT_TIMEZONE_ID end update DialogConfigParm set Value = case when isnull(t.Value, '') <> s.Wert then s.Wert
21 else t.Value end , XDateUpdated = @Xdate , XUserUpdated = @XUser from DialogConfigParm t join ( values (case @IsQBMMaster when 1 then @Blindmuster else
22 dbo.QBM_FCVIntToString(@CountSockets) end, 'QBM\DBServerProperties\CountSockets') , ( case @IsQBMMaster when 1 then @Blindmuster else dbo.QBM_FCVIntToString
23(@CountCoresPerSocket) end, 'QBM\DBServerProperties\CountCoresPerSocket') , (case @IsQBMMaster when 1 then @Blindmuster else dbo.QBM_FCVIntToString(@CountLogicalProcessorsPerSocket
24) end, 'QBM\DBServerProperties\CountLogicalProcessorsPerSocket') , (case @IsQBMMaster when 1 then @Blindmuster else dbo.QBM_FCVIntToString(@CountCoresTotal
25) end, 'QBM\DBServerProperties\CountCoresTotal') , (case @IsQBMMaster when 1 then @Blindmuster else dbo.QBM_FCVIntToString(@CountLogicalProcessorsTotal
26) end, 'QBM\DBServerProperties\CountLogicalProcessorsTotal') , (case @IsQBMMaster when 1 then 'W. Europe Standard Time' else @CURRENT_TIMEZONE_ID end, 
27'QBM\DBServerProperties\TimeZoneInformation') ) as s (Wert, Fullpath) on t.Fullpath = s.Fullpath END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default 
28RAISERROR ('', 18, 1) WITH NOWAIT END CATCH end 
29

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:30.180

has TRY/CATCH error handling

Summary: calls sys, QBM_PSessionErrorAdd; writes INSERT into, UPDATE DialogConfigParm; reads/joins QBM_VServerEngineProperties, sys, DialogConfigParm

Declared parameters

ParameterTypeDirection
@SlotNumberDummyintinput
@Dummy1varchar(38)input
@Dummy2varchar(38)input
@DummyGenProcidvarchar(38)input

DML targets

INSERT into UPDATE DialogConfigParm

Config/session

Config: None extracted.

Session: None extracted.

DBQueue/tasks

None extracted.

Temp tables / referenced variables

Temp: None extracted.

Variables: @SlotNumberDummy @Dummy1 @Dummy2 @DummyGenProcid @MessageString @x @CountSockets @CountCoresPerSocket @CountLogicalProcessorsPerSocket @CountCoresTotal @CountLogicalProcessorsTotal @CoreDetect @patIndex @DebugSwitch @IsQBMMaster @BlindMuster @CURRENT_TIMEZONE_ID @XUser @procid @Xdate @HasExtendedProc @ROWCOUNT @TimeZoneInformation @Blindmuster

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.