ADSM-L

Re: [ADSM-L] Select statement to only list backups with particular event status

2010-06-29 13:30:05
Subject: Re: [ADSM-L] Select statement to only list backups with particular event status
From: "Moyer, Joni M" <joni.moyer AT HIGHMARK DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Tue, 29 Jun 2010 13:28:28 -0400
Hi Richard,

Is there any other way to do a report that would list missed, failed, in 
progress and started backups then on a daily basis running it from the prior 
day at 6PM until the current time the script is run at 9AM?  I currently run q 
event at 9AM which catches the missed & failed backups, but nothing that 
currently accounts for anything that is in progress or has been started.

Any suggestions/ideas are appreciated!  This one has me stumped!

-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of 
Richard Sims
Sent: Tuesday, June 29, 2010 12:09 PM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: Select statement to only list backups with particular event status

The EVENTS table has been an oddball in TSM, as I note in ADSM QuickFacts, 
because of the way it was engineered.  Using relative timestamp references 
traditionally doesn't work, so you need to employ an absolute timestamp, as in
     select * from events WHERE SCHEDULED_START >= '2010-06-28'

Note also that there is no actual_time column in instances of the EVENTS table 
that I know of.  Use the following to verify column names:
    select * from syscat.columns where tabname='EVENTS'
I haven't seen 'In Progress' as one of the possible status values; but things 
change over numerous releases.

    Richard Sims

On Jun 29, 2010, at 11:05 AM, Moyer, Joni M wrote:

> Hello everyone,
>
> I am trying to create a select statement that will list all backups for 
> clients in the domain: windows & hmig that started after yesterday at 6PM 
> until today at the current date/time that had a status of: Missed, In 
> Progress, Fail%, Started.
>
> I tried the below select statement but it is not giving me everything that I 
> am looking for and it's also reporting future events which I don't want.  Can 
> anyone tell me what I'm doing wrong?
>
> Thanks in advance!
>
> select event as "Event",date(actual_start) as "Date",time(actual_start) as 
> "Start",time(Completed) as "End", node_name, domain_name,Status from events 
> where domain_name='WINDOWS' or domain_name='HMIG' and status like 'Fail%' or 
> status='Missed' or status='In Progres' or status='Started' and 
> actual_time>=current_timestamp-1 day


This e-mail and any attachments to it are confidential and are intended solely 
for use of the individual or entity to whom they are addressed.  If you have 
received this e-mail in error, please notify the sender immediately and then 
delete it.  If you are not the intended recipient, you must not keep, use, 
disclose, copy or distribute this e-mail without the author's prior permission. 
 The views expressed in this e-mail message do not necessarily represent the 
views of Highmark Inc., its subsidiaries, or affiliates.