ph_task table usage
Posted in 2012
Larry asked how the DATETIME/INTERVAL columns in the sysadmin ph_task table work and how to make a task run only weekly on Saturday, plus what happens to rows written to ph_alert. Answers: scheduling by day is controlled by the tk_enable and per-day flags (set tk_saturday to 't', the other tk_* days to 'f'); tk_start_time/tk_stop_time bound the window in which the job may run, tk_frequency is the repeat interval, and a next-execution-time column drives the next run. Alerts aren't pushed anywhere — you view them via OAT or a SELECT, or write your own task to email them (AGS Sentinel was also suggested). A link to an OAT customisation article was posted too.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Platform-Specific Issues
I am using Solaris 10 running IDS 11.50.FC5.
Can anyone explain the DATETIME and INTERVAL parameters for the ph_task
table and tell me how to change the following to run once per week on
Saturday?
INSERT INTO ph_task
(
tk_name,
tk_type,
tk_group,
tk_description,
tk_execute,
tk_start_time,
tk_stop_time,tk_frequency
)
VALUES
(
"check_table_pages1",
"TASK",
"TABLES",
"Checks maximum number of table pages.",
"check_table_pages1",
DATETIME(02:00:00) HOUR TO SECOND,
NULL,
INTERVAL ( 4 ) HOUR TO HOUR
);
Thank you.
Also, how are alerts processed once they reach the ph_alerts table?
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of Larry
Sorensen
Sent: Thursday, April 26, 2012 1:44 PM
To: ids@iiug.org
Subject: ph_task table usage [26847]
I am using Solaris 10 running IDS 11.50.FC5.
Can anyone explain the DATETIME and INTERVAL parameters for the ph_task
table and tell me how to change the following to run once per week on
Saturday?
INSERT INTO ph_task
(
tk_name,
tk_type,
tk_group,
tk_description,
tk_execute,
tk_start_time,
tk_stop_time,tk_frequency
)
VALUES
(
"check_table_pages1",
"TASK",
"TABLES",
"Checks maximum number of table pages.", "check_table_pages1",
DATETIME(02:00:00) HOUR TO SECOND,
NULL,
INTERVAL ( 4 ) HOUR TO HOUR
);
Thank you.
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
Ok.
A simple google search about "informix oat customizat" gave me this link, that
will explain what you need.... :(
http://www.planetids.com/content/oat-monitor-dbspace-usage-monitoriza%C3%A7%C3%A
3o-de-ocupa%C3%A7%C3%A3o-de-dbspaces
Regards.
Alexandre Marini
IBM Informix Certified Professional v10 / v11.50 / v11.70
IBM Information Management Informix Technical Professional
IBM Infosphere DataStage Technical Professional
Database Administrator
> To: ids@iiug.org
> From: lsorensen25@msn.com
> Subject: ph_task table usage [26847]
> Date: Thu, 26 Apr 2012 15:44:30 -0400
>
> I am using Solaris 10 running IDS 11.50.FC5.
>
> Can anyone explain the DATETIME and INTERVAL parameters for the ph_task
> table and tell me how to change the following to run once per week on
> Saturday?
>
> INSERT INTO ph_task
> (
> tk_name,
> tk_type,
> tk_group,
> tk_description,
> tk_execute,
> tk_start_time,
> tk_stop_time,> tk_frequency
> )
> VALUES
> (
> "check_table_pages1",
> "TASK",
> "TABLES",
> "Checks maximum number of table pages.",
> "check_table_pages1",
> DATETIME(02:00:00) HOUR TO SECOND,
> NULL,
> INTERVAL ( 4 ) HOUR TO HOUR
> );
>
> Thank you.
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
set tk_enable to 't'
set tk_saturday to 't'
set the other tk_days to 'f'
The interval is how frequently it will run
there are three datetimes:
startime
stoptime
next execution time
the job will only be eligible to run between start and stop times.
the next exec time is the next time the engine will run it.
j.
On Apr 26, 2012, at 3:44 PM, Larry Sorensen wrote:
> I am using Solaris 10 running IDS 11.50.FC5.=20
>=20
> Can anyone explain the DATETIME and INTERVAL parameters for the =
ph_task=20
> table and tell me how to change the following to run once per week on=20=
> Saturday?=20
>=20
> INSERT INTO ph_task=20
> (=20
> tk_name,=20
> tk_type,=20
> tk_group,=20
> tk_description,=20
> tk_execute,=20
> tk_start_time,=20
> tk_stop_time,=20> tk_frequency=20
> )=20
> VALUES=20
> (=20
> "check_table_pages1",=20
> "TASK",=20
> "TABLES",=20
> "Checks maximum number of table pages.",=20
> "check_table_pages1",=20
> DATETIME(02:00:00) HOUR TO SECOND,=20
> NULL,=20
> INTERVAL ( 4 ) HOUR TO HOUR=20
> );=20
>=20
> Thank you.=20
>=20
>=20
> =
**************************************************************************=
*****=20
> Forum Note: Use "Reply" to post a response in the discussion forum.=20=
>=20
alerts will show up in OAT, or with a select statement.
You could even build a job to collect those and mail them to you.
j.
On Apr 26, 2012, at 4:11 PM, Larry Sorensen wrote:
> Also, how are alerts processed once they reach the ph_alerts table?=20
>=20
> -----Original Message-----=20
> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of =
Larry=20
> Sorensen=20
> Sent: Thursday, April 26, 2012 1:44 PM=20
> To: ids@iiug.org=20
> Subject: ph_task table usage [26847]=20
>=20
> I am using Solaris 10 running IDS 11.50.FC5.=20
>=20
> Can anyone explain the DATETIME and INTERVAL parameters for the =
ph_task=20
> table and tell me how to change the following to run once per week on=20=
> Saturday?=20
>=20
> INSERT INTO ph_task=20
> (=20
> tk_name,=20
> tk_type,=20
> tk_group,=20
> tk_description,=20
> tk_execute,=20
> tk_start_time,=20
> tk_stop_time,=20> tk_frequency=20
> )=20
> VALUES=20
> (=20
> "check_table_pages1",=20
> "TASK",=20
> "TABLES",=20
> "Checks maximum number of table pages.", "check_table_pages1",=20
> DATETIME(02:00:00) HOUR TO SECOND,=20
> NULL,=20
> INTERVAL ( 4 ) HOUR TO HOUR=20
> );=20
>=20
> Thank you.=20
>=20
> =
**************************************************************************=
**=20
> ***=20
> Forum Note: Use "Reply" to post a response in the discussion forum.=20
>=20
>=20
> =
**************************************************************************=
*****=20
> Forum Note: Use "Reply" to post a response in the discussion forum.=20=
>=20
So, just to recap to make sure that I understand what has been said....
If I create a function to check on something, and then I write entries to the
ph_alert table, unless I run OAK or unless I write an application to
specifically look at the ph_alert table, I will never see any other
notification that something has been inserted into the ph_alert table?
Thank you.
Larry
> To: ids@iiug.org
> From: jack.parker4@verizon.net
> Subject: Re: ph_task table usage [26852]
> Date: Thu, 26 Apr 2012 20:06:59 -0400
>
> alerts will show up in OAT, or with a select statement.
>
> You could even build a job to collect those and mail them to you.
>
> j.
>
> On Apr 26, 2012, at 4:11 PM, Larry Sorensen wrote:
>
> > Also, how are alerts processed once they reach the ph_alerts table?=20
> >=20
> > -----Original Message-----=20
> > From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of =
> Larry=20
> > Sorensen=20
> > Sent: Thursday, April 26, 2012 1:44 PM=20
> > To: ids@iiug.org=20
> > Subject: ph_task table usage [26847]=20
> >=20
> > I am using Solaris 10 running IDS 11.50.FC5.=20
> >=20
> > Can anyone explain the DATETIME and INTERVAL parameters for the =
> ph_task=20
> > table and tell me how to change the following to run once per week on=20=
>
> > Saturday?=20
> >=20
> > INSERT INTO ph_task=20
> > (=20
> > tk_name,=20
> > tk_type,=20
> > tk_group,=20
> > tk_description,=20
> > tk_execute,=20
> > tk_start_time,=20
> > tk_stop_time,=20> > tk_frequency=20
> > )=20
> > VALUES=20
> > (=20
> > "check_table_pages1",=20
> > "TASK",=20
> > "TABLES",=20
> > "Checks maximum number of table pages.", "check_table_pages1",=20
> > DATETIME(02:00:00) HOUR TO SECOND,=20
> > NULL,=20
> > INTERVAL ( 4 ) HOUR TO HOUR=20
> > );=20
> >=20
> > Thank you.=20
> >=20
> > =
> **************************************************************************=
> **=20
> > ***=20
> > Forum Note: Use "Reply" to post a response in the discussion forum.=20
> >=20
> >=20
> > =
> **************************************************************************=
> *****=20
> > Forum Note: Use "Reply" to post a response in the discussion forum.=20=
>
> >=20
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
You could write a task to email new alerts to you. Or you could use AGS
Sentinel.
Art
On Apr 27, 2012 11:15 AM, "LARRY SORENSEN" <lsorensen25@msn.com> wrote:
> So, just to recap to make sure that I understand what has been said....
>
> If I create a function to check on something, and then I write entries to
> the
> ph_alert table, unless I run OAK or unless I write an application to
> specifically look at the ph_alert table, I will never see any other
> notification that something has been inserted into the ph_alert table?
>
> Thank you.
>
> Larry
>
> > To: ids@iiug.org
> > From: jack.parker4@verizon.net
> > Subject: Re: ph_task table usage [26852]
> > Date: Thu, 26 Apr 2012 20:06:59 -0400
> >
> > alerts will show up in OAT, or with a select statement.
> >
> > You could even build a job to collect those and mail them to you.
> >
> > j.
> >
> > On Apr 26, 2012, at 4:11 PM, Larry Sorensen wrote:
> >
> > > Also, how are alerts processed once they reach the ph_alerts table?=20
> > >=20
> > > -----Original Message-----=20
> > > From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
> =
> > Larry=20
> > > Sorensen=20
> > > Sent: Thursday, April 26, 2012 1:44 PM=20
> > > To: ids@iiug.org=20
> > > Subject: ph_task table usage [26847]=20
> > >=20
> > > I am using Solaris 10 running IDS 11.50.FC5.=20
> > >=20
> > > Can anyone explain the DATETIME and INTERVAL parameters for the =
> > ph_task=20
> > > table and tell me how to change the following to run once per week
> on=20=
> >
> > > Saturday?=20
> > >=20
> > > INSERT INTO ph_task=20
> > > (=20
> > > tk_name,=20
> > > tk_type,=20
> > > tk_group,=20
> > > tk_description,=20
> > > tk_execute,=20
> > > tk_start_time,=20
> > > tk_stop_time,=20> > > tk_frequency=20
> > > )=20
> > > VALUES=20
> > > (=20
> > > "check_table_pages1",=20
> > > "TASK",=20
> > > "TABLES",=20
> > > "Checks maximum number of table pages.", "check_table_pages1",=20
> > > DATETIME(02:00:00) HOUR TO SECOND,=20
> > > NULL,=20
> > > INTERVAL ( 4 ) HOUR TO HOUR=20
> > > );=20
> > >=20
> > > Thank you.=20
> > >=20
> > > =
> >
> **************************************************************************=
> > **=20
> > > ***=20
> > > Forum Note: Use "Reply" to post a response in the discussion forum.=20
> > >=20
> > >=20
> > > =
> >
> **************************************************************************=
> > *****=20
> > > Forum Note: Use "Reply" to post a response in the discussion forum.=20=
> >
> > >=20
> >
> >
> >
>
>
*******************************************************************************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--14dae9340c018d52ba04beaf5e69