Hi SangGyu.
This is the SQL to set that up:
DATABASE sysadmin;
DROP FUNCTION IF EXISTS hq_start(INT,INT);
CREATE FUNCTION hq_start
(
task_id INT DEFAULT NULL,
task_seq INT DEFAULT NULL
)
RETURNING INTEGER AS result;
-- Run Oninit shell script to start InformixHQ
-- Doug Lawry, Oninit Consulting, February 2020
-- See www.oninitgroup.com/technical-articles
DEFINE str, col VARCHAR(255);
DEFINE err, rc INTEGER;
ON EXCEPTION IN (-668)
SET err, rc
END EXCEPTION WITH RESUME;
LET rc = 0;
IF task_id IS NULL
AND task_seq IS NULL
THEN
-- Execute without arguments to create task:
-- EXECUTE FUNCTION hq_start();
INSERT INTO ph_task
(
tk_name,
tk_description,
tk_type,
tk_execute,
tk_frequency,
tk_delete,
tk_start_time,
tk_stop_time,
tk_next_execution
) VALUES (
'hq_start',
'Start InformixHQ (Oninit)',
'STARTUP TASK',
'hq_start',
10 UNITS SECOND,
30 UNITS DAY,
NULL,
NULL,
NULL
);
ELSE
-- Test directly outside of Task Scheduler with:
-- EXECUTE FUNCTION hq_start(0,0);
LET str = '$INFORMIXDIR/hq/informixhq-control.sh start';
SYSTEM str;
LET rc = - rc; -- convert back to shell error code
IF task_id > 0
AND task_seq > 0
THEN
IF rc = 0 THEN
LET str = '"' || str || '" succeeded';
LET col = 'GREEN';
ELSE
LET str = '"' || str || '" error ' || rc || ': try running manually';
LET col = 'RED';
END IF
INSERT INTO ph_alert (
alert_task_id,
alert_task_seq,
alert_object_name,
alert_color,
alert_message
) VALUES (
task_id,
task_seq,
'InformixHQ',
col,
str
);
END IF
END IF
RETURN rc;
END FUNCTION;
EXECUTE FUNCTION hq_start();
------------------------------
Doug Lawry
------------------------------
Original Message:
Sent: Tue March 17, 2020 03:44 AM
From: SangGyu Jeong
Subject: What are the changes to InformixHQ?
Hi Doug,
That's a great article! I am also interested in the startup task.
Is that task different from the command below in Article?
su - informix -c '$INFORMIXDIR/hq/informixhq-control.sh start'
------------------------------
SangGyu Jeong
Software Engineer
Infrasoft
Seoul Korea, Republic of
Original Message:
Sent: Tue March 17, 2020 02:23 AM
From: Doug Lawry
Subject: What are the changes to InformixHQ?
Hi SangGyu.
Yes - I would like to know that! I just had this published:
https://www.oninitgroup.com/informixhq-setup
Not in the article, I also have a startup task to run the script listed, so that HQ starts automatically with IDS. Let me know if that's of interest.
------------------------------
Doug Lawry
Original Message:
Sent: Mon March 16, 2020 04:31 AM
From: SangGyu Jeong
Subject: What are the changes to InformixHQ?
Hello All,
Informix 12.10.xC14, which was recently released, contains version 1.1.1.2, and 14.10.xC3 contains version 1.1.1.
Does anyone know about the documentation plan for changes made to each version of InformixHQ?
------------------------------
SangGyu Jeong
Software Engineer
Infrasoft
Seoul Korea, Republic of
------------------------------
#Informix