Results 1 to 3 of 3
-
06-13-2012, 01:49 PM #1Newcomer
- Join Date
- Jul 2010
- Posts
- 40
- Thanks
- 1
- Thanked 0 Times in 0 Posts
why im getting more than one result?
I'm kind of wondering what I'm doing wrong.
I am trying to just get the output of a specific backup completion. I would like to know it completion from the very last backup that ran 4 hours prior to running.
select node_name,status from events where scheduled_start = current_date and node_name in (select node_name from nodes where domain_name='DOM1' )
The following gives me nothing, no error, just no results.
Now this one does give me the correct results, but it displays it 5 times...why?
>select node_name,status from events where scheduled_start < current_date and node_name in (select node_name from nodes where domain_name='DOM1' and Contact='sonic')
it outputs:
NODE_NAME STATUS
----------------------------------------------------------------- --------------------------
SERVERA Completed
SERVERA Completed
SERVERA Completed
SERVERA Completed
SERVERA Completed
My best guess is it is getting the last 5 days completion from the events log?
Now going by that logic, I came up with:
Can you tell me if this is doing exactly what I want, giving me the output of last nights backup fro SERVERA?
tsm>select NODE_NAME,STATUS,RESULT from events where status = 'Completed' and node_name in (select node_name from nodes where scheduled_start >=(current_date)-(1)days and node_name='SERVERA')
This outputs EXACTLY one line with a completion like:
NODE_NAME STATUS
----------------------------------------------------------------- --------------------------
SERVERA Completed
select NODE_NAME,STATUS,RESULT from events where status !='Completed' and node_name in (select node_name from nodes where scheduled_start >=(current_date)-(1)days and node_name='SERVERB')
Now when I run this one, it outputs :
NODE_NAME STATUS RESULT
----------------------------------------------------------------- -------------------------- ------------
SERVERB Failed 12
SERVERB Future
I do NOT want to see FUTURE... only anything other
-
06-14-2012, 03:12 PM #2Senior Member
- Join Date
- Dec 2004
- Location
- NC
- Posts
- 200
- Thanks
- 0
- Thanked 11 Times in 11 Posts
Since I can't replicate your exact output on my 5.5.6 server I am assuming you are running TSM 6.x. That said, you probably are looking for something like this
select NODE_NAME,STATUS,RESULT from events where status not in ('Future','Completed') and date(scheduled_start)>current_date - 1 day
However, in 5.x the event table is a bit finicky. The above does not go past midnight on the day you run the query. If I do a select * from events my first record is from today. This might be different in 6.x"If we knew what it was we were doing, it would not be called research, would it?" -- Albert Einstein
-
06-14-2012, 04:20 PM #3Newcomer
- Join Date
- Jul 2010
- Posts
- 40
- Thanks
- 1
- Thanked 0 Times in 0 Posts
Aww... so close. Yep that is what I was missing. I have not really found a good place gain further knowledge on the ins and outs of select statements within TSM (creating, querying tables)...etc.
I take it there is a significant difference in 5.x and 6.x. I would assume because of the use of DB2 as the DB versus what was used in 5.x.
thanks!!
Similar Threads
-
Meaning of the column Result?
By fakesugar in forum TSM Reporting & MonitoringReplies: 0Last Post: 04-04-2008, 01:09 PM -
-99 result in daily report
By mponte in forum Backup / Archive DiscussionReplies: 3Last Post: 03-07-2008, 09:56 AM -
Image Backup Result 8
By David_FA in forum Backup / Archive DiscussionReplies: 7Last Post: 02-18-2008, 03:50 AM -
Process end result?
By cheffern in forum OthersReplies: 9Last Post: 05-08-2007, 12:36 AM -
INS1074I - RESULT CODE NOT ZERO =4
By DennyP in forum Backup / Archive DiscussionReplies: 0Last Post: 02-14-2003, 01:26 PM


Reply With Quote