ADSM-L

[ADSM-L] Broken query question

2008-10-01 15:10:33
Subject: [ADSM-L] Broken query question
From: "Huebschman, George J." <GJHuebschman AT LMUS.LEGGMASON DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Wed, 1 Oct 2008 15:09:18 -0400
Greetings everyone,
        I ran what I thought was a pretty simple SQL query, but I
received (semi) garbage information back.
I wanted to get slimmed down information like a QUERY SCHEDULE, to find
out what Schedule and what scheduled-time a client was set to back up.
I wanted the answer to this question: What is the scheduled start time
for the schedule assocatied to Node X?

This is the query I ran:
select asoc.node_name, asoc.schedule_name, sch.starttime -
from client_schedules sch, associations asoc -
where asoc.schedule_name=sch.schedule_name and asoc.node_name='AIXDEV8'


I expected to see information like this:

NODE_NAME              SCHEDULE_NAME          STARTTIME
------------------     ------------------     ---------
AIXDEV8                7PM-DAILY-INCR          19:00:00

What I got was this:

NODE_NAME              SCHEDULE_NAME          STARTTIME
------------------     ------------------     ---------
AIXDEV8                7PM-DAILY-INCR          19:00:00
AIXDEV8                7PM-DAILY-INCR          19:01:00
AIXDEV8                7PM-DAILY-INCR          20:00:00


     There is only one schedule in the domain where this client is
registered.
     However, there are 7PM-DAILY-INCR schedules in other domains using
the StartTimes listed in the output.

We were able to make the query work by adding a "distinct(asoc.domain
_name) parameter.  But...why was that necessary?
 - I had expected that the paramater naming the node_name would limit
the query to only the schedule associated to that node....and it did,
partially.
 - What it really did was limit the query to schedules with the same
name as the one associated to the target client.

 - It looked up the client,
 - found the associated schedule,
 - found the time,
 - then found other schedules with the same name which are NOT
associated to that node_name...why?
It

WHY do I care, given that the correct info is so easy to find?
Because I did something that I thought should work and I don't
understand why it didn't.  If I have a flawed understanding of this, I
can not trust other queries.

Thanks.

George Huebschman


IMPORTANT: E-mail sent through the Internet is not secure and timely delivery 
of Internet mail is not guaranteed. Legg Mason therefore, recommends that you 
do not send any  action-oriented or time-sensitive information to us via 
electronic mail, or any confidential or sensitive information including:  
social security numbers, account numbers, or personal identification numbers.

This message is intended for the addressee only and may contain privileged or 
confidential information. Unless you are the intended recipient, you may not 
use, copy or disclose to anyone any information contained in this message. If 
you have received this message in error, please notify the author by replying 
to this message and then kindly delete the message. Thank you.

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