ADSM-L

Storage Pools/Volumes SQL

2004-06-20 16:12:38
Subject: Storage Pools/Volumes SQL
From: Benhayoune Khalid <Benhayoune AT CIH.CO DOT MA>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Sun, 20 Jun 2004 20:04:25 -0000
Hi all,

The following SQL gives me a wrong result for the column NB_VOLUMES :


tsm: TSM>select stgpool_name,maxscratch,est_capacity_mb,pct_utilized, -
cont> (select count(*) from volumes where
stgpool_name=stgpools.stgpool_name) as NB_VOLUMES -
cont> from stgpools -
cont> where devclass <> 'DISK' -
cont> order by stgpool_name

STGPOOL_NAME            MAXSCRATCH          EST_CAPACITY_MB     PCT_UTILIZED
NB_VOLUMES
------------------     -----------     --------------------     ------------
-----------
ARCH2004                        15                5722020.0              4.2
2
COP2004                         30               11444040.0              2.1
2
COPYPOOL                        50               19073400.0              4.2
2
POOLBAND                        10                3869329.7             11.2
2
POOLSTA                         15                5722020.0              6.9
2

tsm: TSM>select stgpool_name,count(*) from volumes group by stgpool_name

STGPOOL_NAME            Unnamed[2]
------------------     -----------
ARCH2004                         2
COP2004                          5
COPYPOOL                         8
POOLBAND                         2
POOLDISK                         4
POOLSTA                          4

I do not understand why. Did I miss something here ?

Any suggestion will be very appreciated.

Thanks in advance.

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