ADSM-L

Re: sql query - filespaces using a mgt class

2003-10-15 13:46:19
Subject: Re: sql query - filespaces using a mgt class
From: Richard Rhodes <rrhodes AT FIRSTENERGYCORP DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Wed, 15 Oct 2003 13:44:00 -0400
Thanks for the info - will have to try this method.

What I did . . .

1)  I ran the "select distinct" . . . . and it timed out.
2)  I ran a "select. . . . where class_name = "xxxxx", and it timed out.

3)  So, I ran a straight "select node_name, filespace_name, class_name from
backups", which
generated a very big file - over 4gb and took +20hr to create.  But, it ran
and finished.

I think running a query that was continually returning results kept a
timeout from occuring.

I then used normal unix utilities to get the info I needed.

Will try again with your suggestion to see how it works.

Thanks

Rick




                      "Prather, Wanda"
                      <Wanda.Prather@JH        To:       ADSM-L AT VM.MARIST 
DOT EDU
                      UAPL.EDU>                cc:       (bcc: Richard L. 
Rhodes/OE/FirstEnergy)
                      Sent by: "ADSM:          Subject:  Re: sql query - 
filespaces using a mgt class
                      Dist Stor
                      Manager"
                      <[email protected]
                      .EDU>


                      10/15/2003 01:30
                      PM
                      Please respond to
                      "ADSM: Dist Stor
                      Manager"






Hi Richard,

The query that you issued should work, but it has got to traverse a VERY
LARGE chunk of the TSM DB and do comparisons on the results.
For anything other than a trivial sized DB, it's very hard to get that
query
to complete.  It won't complete on my TSM DB, either.

If you want to traverse the backups table successfully, use the index.
It's indexed on node_name.

So, what I've done is this:

Write a host script that invokes TSM:

First,
        select node_name from nodes

Then have the host script cycle through the list of nodes with:

        select node_name, filespace_name, class_name from backups where
node_name='XXXXXXX'

for each node.  Send the output into a flat file.

This query pulls out the information but uses smaller queries via the index
for node_name.
The result is a flat file you can process with your favorite host language
to get the info you want.

Hope that helps.

Wanda Prather
Johns Hopkins University Applied Physics Laboratory
443-778-8769

"Intelligence has much less practical application than you'd think" -
Dilbert/Scott Adams

-----Original Message-----
From: Richard Rhodes [mailto:rrhodes AT FIRSTENERGYCORP DOT COM]
Sent: Tuesday, October 14, 2003 8:06 AM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: sql query - filespaces using a mgt class


Hi Everyone,

I'm looking for a  way to determine what management classes our
nodes/filespaces use.
I thought this would be easy . . . . .it probably is, but I seem to be
making it hard.

I couldn't find a normal TSM query to provide this data, so I tried a sql
query . . . .

  select distinct node_name, filespace_name, class_name from backups

Well, it ran, and ran, and ran . . . .

Q)  What's the correct/easy/best way to get a list of clients, filespaces,
mgtclass?



-----------------------------------------
The information contained in this message is intended only for the personal
and confidential use of the recipient(s) named above. If the reader of this
message is not the intended recipient or an agent responsible for
delivering
it to the intended recipient, you are hereby notified that you have
received
this document in error and that any review, dissemination, distribution, or
copying of this message is strictly prohibited. If you have received this
communication in error, please notify us immediately, and delete the
original message.






-----------------------------------------
The information contained in this message is intended only for the personal and 
confidential use of the recipient(s) named above. If the reader of this message 
is not the intended recipient or an agent responsible for delivering it to the 
intended recipient, you are hereby notified that you have received this 
document in error and that any review, dissemination, distribution, or copying 
of this message is strictly prohibited. If you have received this communication 
in error, please notify us immediately, and delete the original message.

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