tk_start_time column of ph_task not updated
Posted in 2013
Topics: General Discussion
Hi Team,
I am running the below query to update the 'tk_start_time' column of ph_task
in sysadmin.
update ph_task set tk_start_time = TO_DATE("2013-06-28 00:30:00", "%Y-%m-%d%H:%M:%S") where tk_name='Auto Update Statistics Refresh';
After that when queried the ph_task as below:
select
tk_id,tk_name,tk_result_table,tk_start_time,tk_stop_time,tk_frequency,tk_next_ex
ecution,tk_total_executions,tk_total_time,tk_enable,tk_attributes from ph_task
where tk_name like 'Auto Update Statistics Refresh';
tk_id tk_name tk_result_table tk_start_time tk_stop_time tk_frequency
tk_next_execution tk_total_executions tk_total_time tk_enable tk_attributes
----- ------------------------------ --------------- -------------------
------------------- ---------------- ------------------- -------------------
------------- --------- -------------
33 Auto Update Statistics Refresh None 0001-01-01 00:30:00 0001-01-01 23:00:00
0 00:05:00.00000 2013-06-28 11:36:43 28 2368.05018353 True 412
Here the time portion of tk_start_time is updated but date portion is not
updated.
Why date is still 0001-01-01?
Please suggest
Thanks
Anil
Original post:
Hi Team,
I am running the below query to update the 'tk_start_time' column of ph_task
in sysadmin.
update ph_task set tk_start_time = TO_DATE("2013-06-28 00:30:00", "%Y-%m-%d%H:%M:%S") where tk_name='Auto Update Statistics Refresh';
After that when queried the ph_task as below:
select
tk_id,tk_name,tk_result_table,tk_start_time,tk_stop_time,tk_frequency,tk_next_ex
ecution,tk_total_executions,tk_total_time,tk_enable,tk_attributes from ph_task
where tk_name like 'Auto Update Statistics Refresh';
tk_id tk_name tk_result_table tk_start_time tk_stop_time tk_frequency
tk_next_execution tk_total_executions tk_total_time tk_enable tk_attributes
----- ------------------------------ --------------- -------------------
------------------- ---------------- ------------------- -------------------
------------- --------- -------------
33 Auto Update Statistics Refresh None 0001-01-01 00:30:00 0001-01-01 23:00:00
0 00:05:00.00000 2013-06-28 11:36:43 28 2368.05018353 True 412
Here the time portion of tk_start_time is updated but date portion is not
updated.
Why date is still 0001-01-01?
Please suggest
Thanks
Anil
Response:
Well, in 11.70 in my sysadmin database, the column definition for
tk_start_time is a datetime hour to minute...so it doesn't want a
year/day/month portion. You don't mention what version you are on, so I'm not
sure if the schema of the ph_task table is any different. I would think the
more important thing, assuming you want the task to run is the the value of
tk_enable, and then tk_next_execution (which is a full datetime year to second
rather then the tk_start_time/tk_stop_time which are datetime hour to second
so only interested in the time of day...not the actual day itself).
Jacques Renaut
IBM Informix Advanced Support
APD Team