If you also want to capture file spaces that have no completion date,
consider adding "or backup_end is null" to the "where" criterion, i.e.:

   ... where backup_end < current_timestamp - 1 day or backup_end is null

Regards,

Andy

Andy Raibeck
IBM Software Group
Tivoli Storage Manager Client Development
Internal Notes e-mail: Andrew Raibeck/Tucson/[EMAIL PROTECTED]
Internet e-mail: [EMAIL PROTECTED]

The only dumb question is the one that goes unasked.
The command line is your friend.
"Good enough" is the enemy of excellence.




Alex Paschal <[EMAIL PROTECTED]>
Sent by: "ADSM: Dist Stor Manager" <[EMAIL PROTECTED]>
08/04/2003 12:28
Please respond to "ADSM: Dist Stor Manager"


        To:     [EMAIL PROTECTED]
        cc:
        Subject:        Re: select statement?



Alex,

For number of file spaces that haven't backed up:
select count(*) from filespaces where backup_end<current_timestamp-1 day

For total number of filespaces:
select count(*) from filespaces

For names of filespaces:
select node_name, filespace_name from filespaces where
backup_end<current_timestamp-1 day

I hope this helps.

Alex Paschal
Storage Administrator
Freightliner, LLC
(503) 745-6850 phone/vmail

-----Original Message-----
From: Alexander Lazarevich [mailto:[EMAIL PROTECTED]
Sent: Monday, August 04, 2003 12:23 PM
To: [EMAIL PROTECTED]
Subject: select statement?


Hi,

TSM 5.1.6.5 on windows 2K server. I'm trying to make a command script that
will tell me how many filespaces have a BACKUP_END greater than 1 day.
Then I want it to email those results to me. That way if a client stops
backing up I'll get an email about it and go fix it. The emailing can be
handled by another server, but I need to get the correct SQL statement and
I'm not an SQL guy.

Preferably I'd like an email with a subject of '430/455 clients backed up
on 08/04/2003', or something like that. So I need to count the number of
filespaces that have a BACKUP_END greater than 1 day. I think you can just
set a variable with $1=something. But I don't know how to get the current
time from the server.

Someone else must do this and have a quick answer. Otherwise, I'll just
keep trying to figure it out. I can do it in perl, but I'd rather not.

Thanks in advance,

Alex
---                                                               ---
   Alex Lazarevich | Systems Administrator | Imaging Technology Group
            Beckman Institute - University of Illinois
       [EMAIL PROTECTED] | (217)244-1565 | www.itg.uiuc.edu
---                                                               ---

Reply via email to