ADSM-L

Re: select statement?

2003-08-04 15:35:15
Subject: Re: select statement?
From: Andrew Raibeck <storman AT US.IBM DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Mon, 4 Aug 2003 13:34:56 -0600
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/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.




Alex Paschal <AlexPaschal AT FREIGHTLINER DOT COM>
Sent by: "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
08/04/2003 12:28
Please respond to "ADSM: Dist Stor Manager"


        To:     ADSM-L AT VM.MARIST DOT EDU
        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:alazarev AT ITG.UIUC DOT EDU]
Sent: Monday, August 04, 2003 12:23 PM
To: ADSM-L AT VM.MARIST DOT EDU
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
       alazarev AT itg.uiuc DOT edu | (217)244-1565 | www.itg.uiuc.edu
---                                                               ---

<Prev in Thread] Current Thread [Next in Thread>