ADSM-L

Re: Select for access date

2004-08-31 21:04:29
Subject: Re: Select for access date
From: "Mark D. Rodriguez" <mark AT MDRCONSULT DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Tue, 31 Aug 2004 20:05:03 -0500
Geoffrey,

You asked for access time which really isn't tracked but both read and
write times are so I used them.

Ok this is sort of a long one.  It is all one line so if you put it into
a Admin Script keep that in mind.  Also, I am giving it to you as if it
where going to be a script where you pass it parms, i.e. $1 and $2.
Here it is:

select volume_name, cast(last_write_date as date) as "Last Write Date",
cast(last_read_date as date) as "Last Read Date" from volumes where
stgpool_name='$1' and cast(last_write_date as date)<(current_date-180
days) and cast(last_read_date as date)<(current_date-180 days) order by $2

$1 will be the storage pool name, remember all caps
$2 will be the column you want to sort by

Good luck I hope this works for you.

Gill, Geoffrey L. wrote:

I'm wondering if anyone has a select or query that can be tailored for a
specific tape pool that will show me last access date of the tape. I have
quite a few archive tapes I want to start getting out of the library, to
make room for scratch, and would like to start by removing tapes from that
pool that have not been accessed for at least 6 months. Or is that even
available?



Thanks,



Geoff Gill
TSM Administrator
NT Systems Support Engineer
SAIC
E-Mail:   gillg AT saic DOT com
Phone:  (858) 826-4062
Pager:   (877) 854-0975




--
Regards,
Mark D. Rodriguez
President MDR Consulting, Inc.

===============================================================================
MDR Consulting
The very best in Technical Training and Consulting.
IBM Advanced Business Partner
SAIR Linux and GNU Authorized Center for Education
IBM Certified Advanced Technical Expert, CATE
AIX Support and Performance Tuning, RS6000 SP, TSM/ADSM and Linux
Red Hat Certified Engineer, RHCE
===============================================================================

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