====== pears.GetDatabaseServerInfo ====== Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. ===== Original SQL ===== COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."GetDatabaseServerInfo" IS {create function GetDatabaseServerInfo /* Application Maintained Function / Procedure - DO NOT EDIT*/ () returns long varchar begin declare FileName char(200); declare rv long varchar; declare @Platform char(100); set @Platform = (select property('platform')); if @Platform like '%UNIX%' or @Platform like '%LINUX%' then set FileName= string(replace((select db_property('file')),'IQX.db',''),'temp/SysInfo',uniquekey('A'),'.txt'); call xp_CmdShell(string('lscpu > ',FileName)); call xp_CmdShell(string('lsmem >> ',FileName)); else set FileName = string((select xp_GetEnv('TEMP')),'\\SysInfo',UniqueKey('A'),'.txt'); //if TEMP not expanded out at this point xp_Read_File fails call xp_CmdShell(string('%SystemRoot%\\system32\\systeminfo.exe > ',FileName)); end if; set rv = xp_Read_File(FileName); call sp_Delete_File(FileName); return rv end }