ADSM-L

Re: SQL and ADSM ACT LOG Queries

1999-12-23 09:42:56
Subject: Re: SQL and ADSM ACT LOG Queries
From: Bacchi Matt VENDOR <v2bacchi AT BTV.IBM DOT COM>
Date: Thu, 23 Dec 1999 09:42:56 -0500
Michael,
It sounds like you want to do something like this:

        select * from actlog where date_time \> '1999-12-22 00:00:00.000000' 
and date_time \< '1999-12-23 00:00:00.000000'

Unfortunately the select command is quite picky about the format of the date 
field which you are attempting to match.  It needs to be in the format shown 
above.  Also, this command is assuming you are using the interactive command 
line client, not from a script.  In a script you need to escape all the 
shell metacharacters, i.e. the asterisk, backslash, single quote....
In the Korn shell, my command looks like this:

            open (SELECT,"dsmadmc -id=adsmadmin -password=$pw -SE=adsm2 
-outfile \"select date_time from actlog where msgno=1025 and date_time \\> 
'$long_date' and message like '%ARCHIVEPOOL%'\" 2>&1|");


Then I can take that SELECT filehandle and perform any operation on it.

Hope this helps.

-Matt
>Does anyone know how to limit sql queries to just one day of the activit>Does 
>anyone know how to limit sql queries to just one day of the activity log.
>Currently, we can produce reports but they contain every record in the activity
>log. We would like to be able to trim the data down to just one day, like
>yesterday.  We want to automatically produce this report so the date command
>should be something like "yesterday".  We don't know and can't figure this out.


*---------------------------------------------------------*
Matt Bacchi                              mbacchi AT us.ibm DOT com
IBM Global Services                    v2bacchi AT btv.ibm DOT com
D54V Server Infrastructure                   (802) 769-4072
ADSM & AFS/DFS Backup                        (tie) 446-4072
<Prev in Thread] Current Thread [Next in Thread>