ADSM-L

Re: Help with select statement

2001-12-06 21:06:34
Subject: Re: Help with select statement
From: Scotty Logan <swl AT STANFORD DOT EDU>
Date: Thu, 6 Dec 2001 18:01:59 -0800
You could try this:

tsm: BARS1>select
node_name,filespace_name,state,hl_name,ll_name,backup_date -
cont> from backups -
cont> where filespace_name='/' and hl_name='/etc/' and ll_name='passwd'
ANR2963W This SQL query may produce a very large result table, or may
require a
significant amount of time to compute.

Do you wish to proceed? (Yes/No) yes

     NODE_NAME: COOT
FILESPACE_NAME: /
         STATE: ACTIVE_VERSION
       HL_NAME: /etc/
       LL_NAME: passwd
   BACKUP_DATE: 2001-08-30 16:40:12.000000

     NODE_NAME: THUNDERBIRD
FILESPACE_NAME: /
         STATE: ACTIVE_VERSION
       HL_NAME: /etc/
       LL_NAME: passwd
   BACKUP_DATE: 2001-09-11 23:23:14.000000

However, on a large system this will take a long time.  You'll get
better performance if you can match the node_name, filespace_name,
filespace_id (available from the filespaces table), state and type
fields to known values.

Unfortunately, neither the path (HL_NAME) nor the filename (LL_NAME) are
indexed:

tsm: BARS1>select colname,colno,index_keyseq -
cont> from columns -
cont> where tabname='BACKUPS' -
cont> order by colno

COLNAME                 COLNO     INDEX_KEYSEQ
------------------     ------     ------------
NODE_NAME                   1                1
NODE_NAME                   1                1
FILESPACE_NAME              2                2
FILESPACE_ID                3                3
STATE                       4                4
TYPE                        5                5
HL_NAME                     6
LL_NAME                     7
OBJECT_ID                   8
BACKUP_DATE                 9
DEACTIVATE_DATE            10
OWNER                      11
CLASS_NAME                 12

  Scotty

--
Scotty Logan <swl AT stanford DOT edu>
Scotty Logan <swl AT stanford DOT edu>
ITSS-CSS http://www.stanford.edu/group/itss/css/

> -----Original Message-----
> From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU]On
> Behalf Of
> Lewis, Thomas R.
> Sent: Thursday, December 06, 2001 13:36
> To: ADSM-L AT VM.MARIST DOT EDU
> Subject: Help with select statement
>
>
> Hello all.  I am a newbie to TSM and I am looking for a
> little help with a
> select statement.  All I want to know is how many copies of a
> certain file
> is in our TSM database and what is its date/time.  Is this information
> possible to retrieve and if so how?
>
> Thanks in advance.
>
> Tom Lewis
> Northrop Grumman
> UNIX/Linux/TSM Systems Administrator
> (410) 765-0375
> email: thomas_r_lewis AT md.northgrum DOT com
>
<Prev in Thread] Current Thread [Next in Thread>