ADSM-L

Re: help with sql

2001-12-21 14:22:48
Subject: Re: help with sql
From: Eliza Lau <lau AT VTCAT.CC.VT DOT EDU>
Date: Fri, 21 Dec 2001 14:20:09 -0500
I finally got this sql to work but partially.  The following was ran at 7am on
12/21/2001, but it picked up log entries that are over 24 hours old.  I think
it has something to do with the clock going from 24:00 to 00:00.
I will try again with "date(actlog.date_time)=current_date".


ANS8000I Server command: 'set sqldisplaymode wide'
ANS8000I Server command: 'select date_time, message from actlog where nodename='
PRICEAM.OAEPFEM.VT.EDU' and time(actlog.date_time) >= current time - 10 hours'

2001-12-19 22:59:08.000000     ANE4987E Error processing '\\priceam\c$\Documents
 and Settings\Anita Price\Local Settings\Temp \JVM30.tmp': the object is in use
by another process

2001-12-19 22:59:10.000000     ANE4987E Error processing '\\priceam\c$\Documents
 and Settings\Anita Price\Local Settings\Temp \JVM33.tmp': the object is in use
by another process

2001-12-20 23:02:22.000000     ANE4952I Total number of objects inspected:   64,
442


2001-12-20 23:02:22.000000     ANE4954I Total number of objects backed up:    1,
895
...

Eliza

> Strange.
> Your query worked for me (with a different nodename), although I had to add
> the date to restrict the output to the last 7 hours:
>
> tsm: SSDADSM>select date_time, message from actlog where nodename='PRATHW1'
> and
> time(actlog.date_time) >= current_time - 7 hours and date(actlog.date_time)=
> current_date
>
> If you do:  q actlog search=VTCAT.CC.VT.EDU  begintime=now-7
>
> Do you get anything back?  Should be the same records in both cases...
>
> -----Original Message-----
> From: Eliza Lau [mailto:lau AT VTCAT.CC.VT DOT EDU]
> Sent: Wednesday, December 19, 2001 5:20 PM
> To: ADSM-L AT VM.MARIST DOT EDU
> Subject: help with sql
>
>
> Hi TSMers,
>
> Can someone help me with with the following.  I am trying to select from the
> actlog all entries for a client in the past 7 hours and send them to the
> user
> in a daily report.  I may not be doing the sql select right.  Nothing is
> selected even though the client just did a backup.
>
> => cat a.mac
> set sqldisplaymode wide
> select date_time, message from actlog where nodename='VTCAT.CC.VT.EDU' and
> time(actlog.date_time) >= current time - 7 hours
>
>
> tsm: ADSM>macro a.mac
> ANS8000I Server command: 'set sqldisplaymode wide'
> ANS8000I Server command: 'select date_time, message from actlog where
> nodename='VTCAT.CC.VT.EDU' and time(actlog.date_time) >= current time - 7
> hours'
> ANR2034E SELECT: No match found using this criteria.
> ANS8001I Return code 11.
> ANS8029E Macro processing terminated.
>
>
> Thanks,
> Eliza Lau
> Virginia Tech Computing Center
> 1700 Pratt Drive
> Blacksburg, VA 24060
> lau AT vt DOT edu
>
<Prev in Thread] Current Thread [Next in Thread>