Re: AW: sql select to count volumes per stgpool by node
2003-05-02 11:45:06
Ah yes, you are correct, since file spaces and copy type are part of the
volume usage table. Thanks!
Andy
Andy Raibeck
IBM Software Group
Tivoli Storage Manager Client Development
Internal Notes e-mail: Andrew Raibeck/Tucson/IBM@IBMUS
Internet e-mail: storman AT us.eyebm DOT com (change eye to i to reply)
The only dumb question is the one that goes unasked.
The command line is your friend.
"Good enough" is the enemy of excellence.
David E Ehresman <deehre01 AT LOUISVILLE DOT EDU>
Sent by: "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
05/02/2003 07:37
Please respond to "ADSM: Dist Stor Manager"
To: ADSM-L AT VM.MARIST DOT EDU
cc:
Subject: Re: AW: sql select to count volumes per stgpool by node
Try replacing count(*) as "Count" with count(distinct volume_name) as
"Count"
The problem is that a volser can appear multiple times in volumeusage
for a given node/storagepool combination.
David
>>> j.salak AT ASAMER DOT AT 05/02/03 10:03AM >>>
Andy,
I do not see an error in your SQL statement,
but the results are much too good to be correct,
new volumes must be created on the fly during the SQL run:
e.G.
AOHEXCHANGE00 TPBACSAFE 81
While I have only 29 tapes in TPBACSAFE ;-)
regards
Juraj
-----Ursprüngliche Nachricht-----
Von: Andrew Raibeck [mailto:storman AT US.IBM DOT COM]
Gesendet: Freitag, 02. Mai 2003 15:41
An: ADSM-L AT VM.MARIST DOT EDU
Betreff: Re: sql select to count volumes per stgpool by node
Maybe this?
select node_name as "Node_Name",
stgpool_name as "StgPool_name",
count(*) as "Count"
from volumeusage
group by stgpool_name, node_name
order by node_name, stgpool_name
Regards,
Andy
Andy Raibeck
IBM Software Group
Tivoli Storage Manager Client Development
Internal Notes e-mail: Andrew Raibeck/Tucson/IBM@IBMUS
Internet e-mail: storman AT us.eyebm DOT com (change eye to i to reply)
The only dumb question is the one that goes unasked.
The command line is your friend.
"Good enough" is the enemy of excellence.
Joel Fuhrman <joelf AT CAC.WASHINGTON DOT EDU>
Sent by: "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
05/01/2003 17:49
Please respond to "ADSM: Dist Stor Manager"
To: ADSM-L AT VM.MARIST DOT EDU
cc:
Subject: sql select to count volumes per stgpool by
node
What is the syntax of the select statement to show the number of
distinct
volumes used by each stgpool for each node. The desired output would
be
something like:
Node_Name StgPool_Name Count
--------- ------------ ------
yakima backupcopy 5
yakima backuptape 3
yakima arccopy 7
yakima arctape 6
olympia backupcopy 23
olympia backuptape 15
...
|
|
|