I do it this way:
First get a list of tapes used by yesterdays backup. Then run a second 
script for every tape. That's much faster.

Skript 1: (Gives a list of tapes used for primary stgpools)
select volume_name as Volume,last_write_date - 
from volumes where - 
last_write_date > timestamp(date(current_date-1 day),'19:00:00') and -
last_write_date < timestamp(date(current_date),'10:00:00') and -
stgpool_name in ('TAPEPOOL','TAPEPOOL2','TAPE_TDP')

Skript 2: (Gives a list with nodename, filespacename, number of files
and amount of backed up data)
select node_name as Node, -
filespace_name as Filespace,-
count(file_name) as Files,-
sum(file_size) as Size -
from contents -
where volume_name='$1' -
group by node_name, filespace_name -
order by files desc

HTH
Thomas Rupp

-----Ursprüngliche Nachricht-----
Von: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] Im Auftrag von Richard 
Mochnaczewski
Gesendet: Montag, 28. November 2005 19:43
An: [email protected]
Betreff: [ADSM-L] Backup of node onto how which volumes from last night's 
backup ?


Hi Everybody,

Does anyone have an SQL to check what tape volumes were used by a specific node 
backup that ran between 6:00 PM and 1:00 AM the previous night ? Can it be 
naroowed down to a filespace name ?

Rich

Reply via email to