Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
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 }