See APARs IC34609 and IC28825 for general information about this issue
(you can search for APARs at the IBM web site http://www.ibm.com).
I think you can "trick" this command into producing the desired results by
inserting the following after the word "WHERE" in your SQL statement:
scheduled_start> '2000-01-01'
thus the complete command is:
select date(scheduled_start) as "Date",
node_name,
schedule_name,
status
from events
where scheduled_start> '2000-01-01' and
date(scheduled_start)>=current date - 2 days and
domain_name='STANDARD'
group by scheduled_start,
node_name,
status,
schedule_name
Note that there is nothing special about "2000-01-01"; it is just an
arbitrary date that is most likely to include all of the records in your
EVENTS table. In general, if you keep event log records for 'n' days, then
coding any date longer than 'n' days ago should work.
Regards,
Andy
Andy Raibeck
IBM Software Group
Tivoli Storage Manager Client Development
Internal Notes e-mail: Andrew Raibeck/Tucson/IBM@IBMUS
Internet e-mail: storman AT us.ibm DOT com
The only dumb question is the one that goes unasked.
The command line is your friend.
"Good enough" is the enemy of excellence.
"ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU> wrote on 07/11/2004
05:07:34:
> Hi to all
>
> Try to run a select command to get events when I run:
>
> select date(Scheduled_start) as "Date", node_name , schedule_name ,
status
> from events where date(Scheduled_start)=current date and
> domain_name='DOWINDOWS' group by scheduled_start ,node_name , status ,
> schedule_name
>
> Output:
>
>
> Date NODE_NAME SCHEDULE_NAME STATUS
> ---------- ------------------ ------------------ ----------
> 2004-07-11 HIGHLEARN_WEB SCHHIGHLEARN Completed
> 2004-07-11 IBROWSE2 SCHED1 Completed
> 2004-07-11 WEB2000_DB SCHWEB2000_I_TDP Missed
> 2004-07-11 HAIFADC01 SCHED5 Completed
> 2004-07-11 HAIFADC02 SCHED6 Completed
> 2004-07-11 EXCHANGE1 SCHEXCHANGEI_1 Completed
> 2004-07-11 HIGHLEARN2K SCHHIGHLEARN_I_TDP Completed
>
> When I try to get 2 days before as:
>
> select date(Scheduled_start) as "Date", node_name , schedule_name ,
status
> from events where date(Scheduled_start)=current date - 2 days and
> domain_name='DOWINDOWS' group by scheduled_start ,node_name , status ,
> schedule_name
>
> Output:
>
> ANR2034E SELECT: No match found using this criteria.
> ANS8001I Return code 11.
> ANS8029E Macro processing terminated.
>
> But when i run a query event for two days as:
>
> q event dowindows * begind=today-2 endd=today endt=08:00
>
> I got the correct list ........
>
> Can anybody help to fix the select command for a correct result ......
> T.I.A regards
>
> Robert Ouzen
> e-mail: rouzen AT univ.haifa.ac DOT il
|