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.
_________________________________________________________________