ADSM-L

Re: sql select to count volumes per stgpool by node

2003-05-02 09:42:19
Subject: Re: sql select to count volumes per stgpool by node
From: Andrew Raibeck <storman AT US.IBM DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 2 May 2003 06:41:02 -0700
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
...

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