ADSM-L

Re: Select statement help.

2004-08-13 04:09:37
Subject: Re: Select statement help.
From: Bruce Mitchell <Bruce.Mitchell AT BARCLAYSCAPITAL DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 13 Aug 2004 09:09:03 +0100
Ben Bullock wrote :-

Ok, this should be simple, but it's driving me nuts.


Ben,

Try this one ... (caters for mulitple libraries....)

* ============================================ */
/* Script Name: Q_STORAGE_UTIL                  */
/* Description: Display utilisation of all      */
/*              TAPE Storage Pools              */
/* Parameters:  None                            */
/* Example:     run Q_STORAGE_UTIL              */
/* ============================================ */
set sqldisplaymode wide
select -
cast (volumes.stgpool_name as varchar(10)) as TAPE_STORAGE_POOL, -
cast ((select library_name from devclasses where stgpools.devclass =
devclasses.devclass_name ) as varchar(9)) as LIBRARY, -
cast (count(volume_name) as integer) as #_VOLUMES, -
cast (maxscratch as integer) as MAX_VOLUMES, -
cast (sum(volumes.est_capacity_mb)/1024 as integer) as CAPACITY_GB, -
cast (avg(volumes.pct_utilized) as integer) as "%_UTILIZATION" -
from volumes, stgpools -
where volumes.stgpool_name = stgpools.stgpool_name -
and devclass_name <> 'DISK' -
and devclass_name <> 'FILE' -
group by volumes.stgpool_name, maxscratch


Bruce Mitchell
Storage Management (AABR Project)
Barclays Capital
Canary Wharf, London
* +44 (020) 7773 4010
* bruce.mitchell AT barcap DOT com




------------------------------------------------------------------------
For more information about Barclays Capital, please
visit our web site at http://www.barcap.com.


Internet communications are not secure and therefore the Barclays
Group does not accept legal responsibility for the contents of this
message.  Although the Barclays Group operates anti-virus programmes,
it does not accept responsibility for any damage whatsoever that is
caused by viruses being passed.  Any views or opinions presented are
solely those of the author and do not necessarily represent those of the
Barclays Group.  Replies to this email may be monitored by the Barclays
Group for operational or business reasons.

------------------------------------------------------------------------

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