Re: Active Files
2000-05-26 06:11:34
Gary Ison writes:
> Reinhard and Gerald,
>
> The correct versions of the select statement should be:
>
> Select filespace_name, count(ll_name) from backups where
> node_name='NODE-NAME' and
> state='ACTIVE_VERSION'
> group by filespace_name
>
>
> Select sum(file_size) from contents where file_name in -
> (select ll_name from backups where
> node_name='NODE-NAME' and state='ACTIVE_VERSION')
>
> The first select could omit the filespace_name references. The
What is it for at all?
> second select should eliminate inactive files via the where ... state=
> clause.
No! It only excludes files having no active backup copy. E.g., if file
'XYZ' has one active and three inactive backup copies, the inner select
statement will yield its name and the outer selet statement will result to
Select sum(file_size) from contents where file_name in ('XYZ')
This will summarize all 4 backup copies of 'XYZ', which is not what was
intended!
> CAUTION: The second select statement has been running on my server
> (OS/390 MVS TSM 3.7.2.0) since 3:15 PM yesterday (17.5 hours). I'm not sure
> the "ll_name" and "file_name" fields are going to match up on the two
They will not match up. You will have to concatenate HL_NAME and LL_NAME
and put a blank between them, I think. Might become quite tricky.
> tables. I will probably have to re-cycle my server to get the query
> stopped.
Or cancel the session which started the query.
--
Reinhard Mersch Westfaelische Wilhelms-Universitaet
Reinhard Mersch Westfaelische Wilhelms-Universitaet
Zentrum fuer Informationsverarbeitung - ehemals Universitaetsrechenzentrum
Roentgenstrasse 9-13, D-48149 Muenster, Germany Tel: +49(251)83-31583
E-Mail: mersch AT uni-muenster DOT de Fax:
+49(251)83-31653
|
|
|