ADSM-L

Re: SQL- select

2003-09-16 07:16:23
Subject: Re: SQL- select
From: Joni Moyer <joni.moyer AT HIGHMARK DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Tue, 16 Sep 2003 07:16:01 -0400
Hi Andy!

Thanks for the info.!  I was also wondering if it is possible to find all
files for a particular node that has a certain management class?  Thanks!

Joni Moyer
Systems Programmer
joni.moyer AT highmark DOT com
(717)975-8338



                      Andrew Raibeck
                      <storman AT US DOT IBM.C        To:       ADSM-L AT 
VM.MARIST DOT EDU
                      OM>                      cc:
                      Sent by: "ADSM:          Subject:  Re: SQL- select
                      Dist Stor
                      Manager"
                      <[email protected]
                      .EDU>


                      09/15/2003 11:48
                      AM
                      Please respond to
                      "ADSM: Dist Stor
                      Manager"






Joni,

To find the versions, you can query the BACKUPS table. For example:

   select filespace_name || hl_name || ll_name
         as "File Name                               ",
      cast(backup_date as char(19))
         as "Backup Date        "
      from backups
      where node_name='STORMAN'

Note that the above is one long command I spread across multiple lines to
avoid ugly wrapping problems. Also note the blank spaces in the "as" text
strings. This is to avoid wrapping of long file names. You can add or
remove spaces as necessary to adjust the output column width as you wish
(wrapping for very long names may be unavoidable). For a TSM server of any
substantive size, the query will probably take a long time to run (from
many minutes to hours).

As to predicting what files will be available in the next n number of
days, it would at least involve obtaining information from the BACKUPS and
BU_COPYGROUPS tables. But since TSM management policies are based on
things not contained in the tables -- events that you can not accurately
predict such as when a file will change, whether someone will perform
selective backups against it, or whether the user will delete it at some
future time -- I don't know how you could make such a determination. I
suppose that you could "massage" the data (with more than just SELECT)
from the two aforementioned tables and do an analysis that assumes time is
frozen for the next 95 days (*nothing* changes), but the usefulness of
such an analysis would be highly suspect.

To illustrate what I mean, suppose there is an active backup version of
some file and the copy group has VEREXISTS=5, VERDELETED=1, RETEXTRA=100,
RETONLY=200

Now, will this file be around 95 days from now? The answer is, "it
depends":

- If the file does not change and I do not delete it, then yes, I expect
it to be around.

- If the file is backed up no more than 4 times in the next 95 days and it
is not deleted, then yes, I expect it to be around.

- If the file is backed up more than 4 times in the next 95 days, then no,
I do not expect it to be around.

- If the file is backed up one or more times and then subsequently deleted
within the next 95 days, then no, I do not expect it to be around.

There are other variants on this scenario, but hopefully you can see that
determining whether a particular backup version of a file will be around
at some future time is not determinable merely by querying the TSM
database.

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.ibm DOT com

The only dumb question is the one that goes unasked.
The command line is your friend.
"Good enough" is the enemy of excellence.




Joni Moyer <joni.moyer AT HIGHMARK DOT COM>
Sent by: "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
09/15/2003 08:08
Please respond to "ADSM: Dist Stor Manager"

        To:     ADSM-L AT VM.MARIST DOT EDU
        cc:
        Subject:        SQL- select


Hello everyone!

I was just wondering if it is possible to use a select statement to find
all files and all of the versions of the each file for a particular node?
And is there a way to find all files that will still exist after 95 days
from today?  Thanks in advance for any suggestions!

Joni Moyer
Systems Programmer
joni.moyer AT highmark DOT com
(717)975-8338

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