Re: Query for schedule and node

2005-10-14 Thread Andrew Raibeck
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/[EMAIL PROTECTED]
Internet e-mail: [EMAIL PROTECTED]

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"  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: [EMAIL PROTECTED]
>
>
>
> -Original Message-
> From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] On Behalf Of
> Andrew Raibeck
> Sent: Friday, October 14, 2005 9:06 AM
> To: ADSM-L@VM.MARIST.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/[EMAIL PROTECTED]
> Internet e-mail: [EMAIL PROTECTED]
>
> 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"  wrote on 2005-10-13
> 13:13:11:
>
> > Hello all,
> >
> > I'm wondering if anyone has a query for this. Something broken out by
&g

Re: Query for schedule and node

2005-10-14 Thread Gill, Geoffrey L.
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: [EMAIL PROTECTED]



-Original Message-
From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] On Behalf Of
Andrew Raibeck
Sent: Friday, October 14, 2005 9:06 AM
To: ADSM-L@VM.MARIST.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/[EMAIL PROTECTED]
Internet e-mail: [EMAIL PROTECTED]

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"  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:[EMAIL PROTECTED]> [EMAIL PROTECTED]


Re: Query for schedule and node

2005-10-14 Thread Andrew Raibeck
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/[EMAIL PROTECTED]
Internet e-mail: [EMAIL PROTECTED]

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"  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:   [EMAIL PROTECTED]


Re: Query for schedule and node

2005-10-14 Thread Leigh Reed
Geoff,

I'm not 100% sure, but I think that what you're asking for is the
classic SQL union of 2 select statements. As I understand it, this is
possible in a traditional DB2, but the union & intersect operations are
not available in the TSM SQL subset. The closest I can manage is the
following

select A.SCHEDULE_NAME,NODE_NAME,ACTION,STARTDATE,STARTTIME,DURATION
from client_schedules A, associations

Unfortunately, this gives you the duplicate information for every
nodename in the schedule. You want the much tidier output of a single
entry for each schedule, nodename, etc etc and then a following list of
the nodenames.

I can't get this in one single select statement. The only solution I can
manage would be to script it.

Leigh

-Original Message-
From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] On Behalf Of
Gill, Geoffrey L.
Sent: 13 October 2005 21:13
To: ADSM-L@VM.MARIST.EDU
Subject: [ADSM-L] Query for schedule and node

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:[EMAIL PROTECTED]> [EMAIL PROTECTED]


Query for schedule and node

2005-10-13 Thread Gill, Geoffrey L.
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:   [EMAIL PROTECTED]