ADSM-L

Re: no status of empty when querying volume

2004-06-22 12:19:41
Subject: Re: no status of empty when querying volume
From: Nicholas Cassimatis <nickpc AT US.IBM DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Tue, 22 Jun 2004 12:12:40 -0400




If you just want the count of scratch tapes, and only have one library, you
can run "select count(*) from libvolumes where status='Scratch'" to see how
many scratch tapes you have.

Nick Cassimatis
nickpc AT us.ibm DOT com

He who laughs last has a good backup.



                                                                       
             Mark Bertrand                                             
             <Mark.Bertrand@US                                         
             UNWIRED.COM>                                               To
             Sent by: "ADSM:           ADSM-L AT VM.MARIST DOT EDU            
             Dist Stor                                                  cc
             Manager"                                                  
             <[email protected]                                     Subject
             .EDU>                     Re: no status of empty when     
                                       querying volume                 
                                                                       
             06/22/2004 11:18                                          
             AM                                                        
                                                                       
                                                                       
             Please respond to                                         
             "ADSM: Dist Stor                                          
                 Manager"                                              
                                                                       
                                                                       




I can't take credit for this.

I believe someone on the list came up with it or I used Excel with ODBC to
come up with it (I stink at select queries), I put it into a script I call
scratch_query. First it gives the number of scratch tapes then it list
them.

Select library_name, count(*) from libvolumes where status='Scratch' group
by library_name
SELECT LIBVOLUMES.LIBRARY_NAME, LIBVOLUMES.VOLUME_NAME,
LIBVOLUMES.STATUS,LIBVOLUMES.HOME_ELEMENT FROM LIBVOLUMES LIBVOLUMES WHERE
(LIBVOLUMES.STATUS='Scratch') ORDER BY LIBVOLUMES.VOLUME_NAME

Hope it helps.
Mark Bertrand

GIF image

GIF image

GIF image

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