ADSM-L

Re: database query

2000-03-22 21:14:47
Subject: Re: database query
From: Jim Papoutsis <jim.papoutsis AT ZURICH.COM DOT AU>
Date: Thu, 23 Mar 2000 12:14:47 +1000
Anthony



We have similar concerns here, and are trying to keep a track on non-related
buisiness files.

/* Writing report to /var/adsm/reports/ */
set sqldisp wide
/*set sqlmath round*/
/* Calculate the amount of space utlised */
select sum(FILE_SIZE /1048576) as USED_MB  from contents where FILE_NAME=
'XXXXXXXX'
and FILE_NAME like '%USER%' and FILE_NAME like '%.$1'
/* Concatinate a list of the files */
select FILESPACE_NAME, HL_NAME, LL_NAME, OWNER from BACKUPS where NODE_NAME=
'xxxxxxxxx' and LL_NAME like '%.$1' and HL_NAME like '%USER%'*/

The above is used via batch on a AIX system. The variable is passed where ($1)
represents e.g (JPG) is case sensitive.
This is done because of long running time if done via the GUI.




set sqldisp wide
select FILESPACE_NAME, HL_NAME, LL_NAME, OWNER, STATE, BACkUP_DATE from BACKUPS
where
NODE_NAME= 'xxxxxxx' and LL_NAME like 'xxxxxx'


THe above is used if u dont want to pass a variable and just replace xxxx in
LL_NAME with .jpg


Jim Papoutsis
Zurich Financial Services
<Prev in Thread] Current Thread [Next in Thread>