ADSM-L

Re: [ADSM-L] Orphaned filespaces

2007-04-03 00:13:43
Subject: Re: [ADSM-L] Orphaned filespaces
From: Paul Ripke <stix AT STIX.ID DOT AU>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Tue, 3 Apr 2007 14:13:20 +1000
For reference, here's some SQL:

select node_name, filespace_name
from filespaces f
where not exists
  (select distinct node_name, filespace_name
   from occupancy o
   where f.node_name = o.node_name and f.filespace_name = o.filespace_name)

or, without using subqueries (but won't work with TSM):

select f.node_name, f.filespace_name
from filespaces f left join occupancy o using (node_name, filespace_name)
where o.node_name is null

The first takes a while to run on a TSM server. I export selected
tables out of TSM daily and import into MySQL... here, they run
sub-second. Ideal for reporting purposes, I highly recommend it!

--
Paul Ripke
Unix/OpenVMS/TSM/DBA
I love deadlines. I like the whooshing sound they make as they fly by.
-- Douglas Adams