ADSM-L

Re: file search in DB

2002-08-19 12:29:47
Subject: Re: file search in DB
From: "Prather, Wanda" <Wanda.Prather AT JHUAPL DOT EDU>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Mon, 19 Aug 2002 10:47:18 -0400
select node_name, hl_name, ll_name, backup_date from backups where ll_name =
'xxxxxxxx.xxxxx'

This will search the entire backup table.
hl_name is the path, ll_name is the filename only.

If this is a Windoze box, the filename should be ALL UPPER CASE.
If an *IX client, the filename should be mixed case.
If you aren't entirely sure about the spelling of the filename, you can do:
     where ll_name like '%partofname%'

If your TSM DB is very large, this query will take a LOOOONNNNNNG time to
complete; I can't run this query at all on a 30 GB data base.

If you know that the file was on one of a list of client machines, you will
do much better searching one node name at a time, because the Backups table
is indexed on NODE_NAME:

select node_name, hl_name, ll_name, backup_date from backups where ll_name =
'xxxxxxxx.xxxxx' and node_name='XXXXXXXX'

(Trust me, this runs a LOT faster overall, even though you have to run it
several times.)

TRY THIS QUERY FIRST on a client/file combination that you KNOW exists, to
make sure you've got the syntax and case correct.

Hope this helps...
************************************************************************
Wanda Prather
The Johns Hopkins Applied Physics Lab
443-778-8769
wanda_prather AT jhuapl DOT edu

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





-----Original Message-----
From: Jim Healy [mailto:James.Healy AT AXA-TECH DOT COM]
Sent: Monday, August 19, 2002 8:22 AM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: file search in DB


Can anyone tell me if there is a way to search the TSM database and find a
specific file and what server it existed on?
I have some legal requirements to restore a file and my admins don't know
what  server it was on.




"Zlatko Krastev" <acit AT ATTGLOBAL DOT NET>@VM.MARIST.EDU> on 08/18/2002 
08:14:58
PM

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: Select statement question


Henk,

in most cases your select will product good enough results. But if a shop
have many sessions with small ammounts of data to backup (RDBMS logs or
workstations for example) your query results might become inaccurate.
Instead of "select sum(cast(bytes/1024/1024/1024 as decimal))" use "select
cast(sum(bytes)/1024/1024/1024 as decimal)".

Zlatko Krastev
IT Consultant




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: Select statement question

Wayne,

> Can anyone help me with a select query that will tell me how much data
I've
> backed up in the last 24 hours?

select sum(cast(bytes/1024/1024/1024 as decimal(6,3))) "Total GB Backup" -
from summary where start_time>=current_timestamp - 1 day and
activity='BACKUP'

Cheers,
Henk ten Have





**********************************************************************

Confidentiality Note:  This e-mail is intended only for the
person or entity to which it is addressed and may contain
information that is privileged, confidential or otherwise
protected from disclosure.  Dissemination, distribution
or copying of this e-mail or the information herein by
anyone other than the intended recipient, or an employee
or agent responsible for delivering the message to the
intended recipient, is prohibited.  If you have received
this e-mail in error, please contact the sender and destroy
the original message and all copies.

**********************************************************************

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