ADSM-L

Re: sql for available drives?

2003-08-01 11:02:37
Subject: Re: sql for available drives?
From: David E Ehresman <deehre01 AT LOUISVILLE DOT EDU>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 1 Aug 2003 11:01:58 -0400
That almost gives me what I want.  But it counts drives once its
apprearance in the drives table and once for each occurance in the paths
table (each drive appears multiples times in paths because they are
defines to storage agents).  So with all 8 dirves empty, it gives me 48
instead of 8.

David

>>> Richard.Foster AT HYDRO DOT COM 08/01/03 09:45AM >>>

> In tsm v5 where path and drive status are stored seperately, can
> anyone help with a sql query that would return the number of
> drives that are EMPTY and where the drive is online and the path
> to the drive is online.

Try

select count(*) from drives, paths where drives.online='YES' and
paths.online='YES' and drives.DRIVE_NAME=paths.DESTINATION_NAME and
drives.drive_state='EMPTY'

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