ADSM-L

SQL-query for list of tapes with active-versions

2003-03-14 08:20:14
Subject: SQL-query for list of tapes with active-versions
From: brian welsh <brianwelsh3 AT HOTMAIL DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 14 Mar 2003 14:19:30 +0100
Hello,

I want to make a sql_query to find out the amount of tapes with
active-version, so I can find out how many tape mounts will be necessary in
case of a full-system restore.

I tried the following query, but it counts all the tapes, so with active and
inactive versions:
select node_name as System_name,count(DISTINCT volume_name) as Total_tapes
from volumeusage where stgpool_name in ('TAPEPL','TAPEPLA') AND node_name
like '$1%' group by node_name

I tried also the following query:
select node_name as System_name,count(DISTINCT volume_name) as Total_tapes
from volumeusage where filespace_name in (select filespace_name from backups
where state='ACTIVE_VERSION' and node_name like '$1' AND stgpool_name in
('TAPEPL','TAPEPLA') AND node_name like '$1' group by node_name

But the last one also gave me the total amount of tapes, same result as
first query. Can someone give me a hint?

Or is there another way I can see which tapes are necessary for a particular
node in case of a full-system restore?

Thanx,

Brian.





_________________________________________________________________

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