ADSM-L

FYI on tape volume usage select statement (use of DISTINCT)

2002-04-05 14:47:14
Subject: FYI on tape volume usage select statement (use of DISTINCT)
From: "Williams, Tim P {PBSG}" <Tim.Williams AT PBSG DOT COM>
Date: Fri, 5 Apr 2002 13:46:23 -0600
IF your tape stgpool is collocated (you have to consider if a node has
offsite tape volumes and if that
stgpool has colocation on or off as well)
AND you want to know how many tapes a node spans...
try this:
tsm: ADSM>select node_name, count(distinct volume_name) from volumeusage
where node_name='PBSXDR00002' and stgpool_name like '%TAPE' group by
node_name

I gave the select statement the node name, I also provided the a partial
stgpoolname (that will just get my local, non-vaulted, tapes that ARE
collocated....(stgpool_name like '%TAPE')).

FYI...this will take a couple of minutes depending on your db, etc.

tsm: ADSM>select node_name, count(distinct volume_name) from volumeusage
where node_name='PBSXDR00002' and stgpool_name like '%TAPE' group by
node_name
ANR2963W This SQL query may produce a very large result table, or may
require a significant
amount of time to compute.

Do you wish to proceed? (Yes (Y)/No (N)) y

NODE_NAME               Unnamed[2]
------------------     -----------
PBSXDR00002                    218
PBSXDR00002                    218
<Prev in Thread] Current Thread [Next in Thread>
  • FYI on tape volume usage select statement (use of DISTINCT), Williams, Tim P {PBSG} <=