ADSM-L

Re: [ADSM-L] Sql query help

2010-04-07 08:27:43
Subject: Re: [ADSM-L] Sql query help
From: David E Ehresman <deehre01 AT LOUISVILLE DOT EDU>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Wed, 7 Apr 2010 08:26:12 -0400
Does this do what you want?

tsm: ULTSM>q script q_stgsum f=l

Name       Line   Command
           Number
---------- ------ ------------------------------------------------------------
Q_STGSUM   1      select stgpool_name, -
           5             devclass, -
           10            maxscratch, -
           15            numscratchused, -
           20            cast(maxscratch-numscratchused as decimal(4,0)) as
                   "SCR_AVAIL" -
           25            from stgpools -
           30            where stgpool_name like '%VTL' -
           35            order by devclass,stgpool_name

>>> "Lee, Gary D." <GLEE AT BSU DOT EDU> 4/6/2010 3:10 PM >>>
Tsm server 5.5.4 running on suse 9 linux under zvm 5.3.

Trying to create a query which will give me the count of volumes in a storage 
pool, and its maxscratch setting on a single line.
Nice to watch for filling pools which need a larger maxscratch value.
Query follows:

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

 select a.stgpool_name as "Storage Pool Name", -
        a.devclass as "Device Class Name", -
        count( b.volume_name) as "  # VOLUMES", -
        a.maxscratch as "volumes available" -
        from stgpools a, volumes b -
        where a.devclass <>'DISK'  -
and a.devclass = b.devclass_name -
        group by a.stgpool_name, a.devclass

--------- query ends. ------------

Thanks for any help.



Gary Lee
Senior System Programmer
Ball State University
phone: 765-285-1310

 

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