ADSM-L

Re: adsm sql request, want data only...

2000-01-04 17:33:01
Subject: Re: adsm sql request, want data only...
From: Russell Street <russells AT AUCKLAND.AC DOT NZ>
Date: Tue, 5 Jan 0100 11:33:01 +1300
> I need to do a
> select auditocc.node_name , auditocc.total_mb , nodes.domain_name from
> adsm.auditocc , adsm.nodes where auditocc.node_name=nodes.node_name
> but I need to do it across a bunch of servers so I can tack the adsm server
> name and a current date on the front of each line so it will be run in
> something like

The server's name is held in status.server_name.  Current date and
time in current_date and current_time.  So the select becomes:

select -
  status.server_name,
  current_date, current_time, -
  auditocc.node_name , auditocc.total_mb , nodes.domain_name -
from -
  status, adsm.auditocc , adsm.nodes -
where -
  auditocc.node_name=nodes.node_name


[Some] SQL joins in the ADSM server are abysmally slow.  It takes my
ADSM server minutes to complete that statement (cf seconds for your
original).

Your original solution of running the output past awk may be more
efficent.




> so it would be nice if I could omit all the adsm connect junk & even the
> column headers...

I use this shell construct to remove the header information:

dsmadmc -id=xxx -pass=yyy "query stgpool" | egrep -v 
"^ADSTAR|^Command|^\(C\)|^Session|^  Server|^ANS8000I|^$"



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