ADSM-L

Re: Query for schedule and node

2005-10-14 14:28:37
Subject: Re: Query for schedule and node
From: Andrew Raibeck <storman AT US.IBM DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 14 Oct 2005 11:29:17 -0700
Well, my query gives you pretty much what you expressed in your original
post (except I swapped the order of platform and node). It would also help
if you could clarify *exactly* what it is you are looking for, to avoid
the problem of VIVO ("Vague In, Vague Out")      :-)))

You can rearrange the columns in the "SELECT" clause to change the order
in which they appear, and tack on the "order by" clause to sort the output
in whatever order you want. As far as the appearance goes, you can use
-commadelimited or -tabdelimited, and add -dataonly=yes when invoking
dsmadmc, then load the resulting data into a spreadsheet or database. This
will give you the data in a tabular format without the associated issues
of line wrapping.

For example:

dsmadmc -id=knockknock -pa=whosthere -commadelimited -dataonly=yes macro
myselect

where "myselect" is a file containing your query:

select \
       n.node_name, \
       platform_name, \
       c.domain_name, \
       c.schedule_name, \
       action, \
       startdate, \
       starttime, \
       duration, \
       durunits, \
       period, \
       perunits \
   from client_schedules c, nodes n, associations a \
   where c.domain_name=a.domain_name and \
         c.schedule_name=a.schedule_name and \
         n.node_name=a.node_name \
   order by n.node_name, \
            platform_name, \
            c.domain_name, \
            c.schedule_name

Lastly, for very complex queries, it might ultimately be easier/faster to
extract the individual tables into separate files, then use an external
script, program, or database to load that data and massage it as you wish.

Andy Raibeck
IBM Software Group
Tivoli Storage Manager Client Development
Internal Notes e-mail: Andrew Raibeck/Tucson/IBM@IBMUS
Internet e-mail: storman AT us.ibm DOT com

IBM Tivoli Storage Manager support web page:
http://www-306.ibm.com/software/sysmgmt/products/support/IBMTivoliStorageManager.html

The only dumb question is the one that goes unasked.
The command line is your friend.
"Good enough" is the enemy of excellence.

"ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU> wrote on 2005-10-14
11:09:27:

> Seems to be ok but unless I can run it on production I won't know for
sure.
> The question now is how to get this to read in columns by nodename
instead.
> Sorry if this is simple to others but I have no experience with these.
>
>   DOMAIN_NAME: NT_DOM
> SCHEDULE_NAME: CLIENT2_M-F
>        ACTION: INCREMENTAL
>     STARTDATE: 2000-12-18
>     STARTTIME: 22:30:00
>      DURATION: 1
>      DURUNITS: HOURS
>        PERIOD: 1
>      PERUNITS: DAYS
>     NODE_NAME: CP-ITS-MRP01
> PLATFORM_NAME: WinNT
>
> Thanks,
>
> Geoff Gill
> TSM Administrator
> SAIC M/S-G1b
> (858)826-4062
> Email: geoffrey.l.gill AT saic DOT com
>
>
>
> -----Original Message-----
> From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf 
> Of
> Andrew Raibeck
> Sent: Friday, October 14, 2005 9:06 AM
> To: ADSM-L AT VM.MARIST DOT EDU
> Subject: Re: Query for schedule and node
>
> This *might* do what you need. Initial testing suggests it works.
Caveats:
> I guarantee nothing :-) and it will probaby take a while to run (mine
took
> about 15 minutes). Try it and see; look at the tables separately and
make
> sure the output you get looks correct. My main concern is that this
still
> might not filter out all duplicates, but my basic testing on a moderate
> server didn't show any duplicates.
>
> Note: you said you wanted start time, but I'm not sure if you mean the
> schedule definition start time or the event start time. For the latter,
> you'd need to add the events table into the mix.
>
> select c.domain_name, \
>        c.schedule_name, \
>        action, \
>        startdate, \
>        starttime, \
>        duration, \
>        durunits, \
>        period, \
>        perunits, \
>        n.node_name, \
>        platform_name \
>    from client_schedules c, nodes n, associations a \
>    where c.domain_name=a.domain_name and \
>          c.schedule_name=a.schedule_name and \
>          n.node_name=a.node_name
>
> Andy Raibeck
> IBM Software Group
> Tivoli Storage Manager Client Development
> Internal Notes e-mail: Andrew Raibeck/Tucson/IBM@IBMUS
> Internet e-mail: storman AT us.ibm DOT com
>
> IBM Tivoli Storage Manager support web page:
>
http://www-306.ibm.com/software/sysmgmt/products/support/IBMTivoliStorageMan
> ager.html
>
> The only dumb question is the one that goes unasked.
> The command line is your friend.
> "Good enough" is the enemy of excellence.
>
> "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU> wrote on 2005-10-13
> 13:13:11:
>
> > Hello all,
> >
> > I'm wondering if anyone has a query for this. Something broken out by
> > schedule name with the nodes associated with each schedule. I'm
looking
> for
> > schedule name, Action, Date/Time, Period and Duration, Platform and
the
> node
> > names associated with each schedule.
> >
> >
> >
> > Thanks,
> >
> >
> >
> > Geoff Gill
> >
> > TSM Administrator
> >
> > SAIC M/S-G1b
> >
> > (858)826-4062
> >
> > Email:  <mailto:geoffrey.l.gill AT saic DOT com> geoffrey.l.gill AT saic 
> > DOT com

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