ADSM-L

Re: How to find out what tape's a client data are on ?

2001-03-02 08:59:25
Subject: Re: How to find out what tape's a client data are on ?
From: Andy Raibeck <Andrew_Raibeck AT TIVOLI DOT COM>
Date: Fri, 2 Mar 2001 05:59:47 -0800
Hmmmm that doesn't look right to me, either. Just from observation, it
looks as if the DISTINCT keyword is operating on either the first column in
the result set, or maybe the sorting key, since you are now sorting by
storage pool name. Either way, I'm pretty sure that DISTINCT is supposed to
account for distinct rows in their entirety, and not just certain columns.
I'll have to look into this.

Regards,

Andy

Andy Raibeck
IBM Tivoli Systems
Tivoli Storage Manager Client Development
e-mail: araibeck AT tivoli DOT com
"The only dumb question is the one that goes unasked."


"Walker, Lesley R" <lesley.walker AT EDS DOT COM>@VM.MARIST.EDU> on 03/02/2001
11:16:27 AM

Please respond to "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>

Sent by:  "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>


To:   ADSM-L AT VM.MARIST DOT EDU
cc:
Subject:  Re: How to find out what tape's a client data are on ?



> Just out of curiosity, since I've only casually been following
> this thread, was there a specific reason for the "group by"
> clause?
>
> I think what is desired is simplly an "order by" clause, e.g.

Well, I'm really confused now.

I came up with my own version of the query:

select distinct volume_name,stgpool_name
    from volumeusage
    where node_name='FOO'

and that produces an answer:

VOLUME_NAME            STGPOOL_NAME
------------------     ------------------
ITF010                 CPITFPOOL
ITF010                 CPITFPOOL
ITF013                 CPITFPOOL
ITF018                 CPITFPOOL
ITF026                 CPITFPOOL
ITF001                 ITFPOOL
ITF003                 ITFPOOL
ITF004                 ITFPOOL
ITF014                 ITFPOOL
ITF025                 ITFPOOL
ITF027                 ITFPOOL
ITF028                 CPITFPOOL
ITF006                 ITFPOOL
ITF002                 CPITFPOOL

BUT if I add "order by stgpool_name" it doesn't show all the tapes - eg:

VOLUME_NAME            STGPOOL_NAME
------------------     ------------------
ITF010                 CPITFPOOL
ITF010                 CPITFPOOL
ITF001                 ITFPOOL

So what's going on here?