Solved

Backup status

Posted on 2010-09-16
9
671 Views
Last Modified: 2013-11-14
i need tsm sql query to display the backup status as below and need to group by platform

                          Winnt       HP-UX  SOLARIS

(for all possible status in event table )
       

Completed          

Missed

Failed

started

pending

restarted or severed        

0
Comment
Question by:ibmsddk
  • 5
  • 4
9 Comments
 
LVL 68

Expert Comment

by:woolmilkporc
Comment Utility
Hi,
try this, but please be aware that it could take a long time to complete (depending on the number of events/nodes), since the query has to contain an inner join.
select nodes.platform_name, events.node_name, events.status      -
           from nodes, events     -
   where events.node_name=nodes.node_name     -
         and events.status not like 'Future'       -
  group by nodes.platform_name, events.node_name, events.status     -
  order by nodes.platform_name, events.status, events.node_name  

Without specifying a beginning date only the current day's events are displayed. This is because the events table is built dynamically for items older than the current day.
To report about past events you should add an "events.scheduled_start" restriction containing an artificial beginning date to the "where" clause.
If all this is not what you expected please post a sample how you'd want the output to look like.
wmp
 
0
 

Author Comment

by:ibmsddk
Comment Utility
format is this

                                 Completed        Missed       Failed  Severed ......possible staus in event table


Platform_name

Winnt

HP-UX

Solaris

...

ALL poosible palatform_name

     
0
 

Author Comment

by:ibmsddk
Comment Utility
and its okay if it needs computed per 24 hours ..
i.e using scheduled_start between date in format " '2009-10-08 00:00:00' and '2009-10-09 00:00:00'"
0
 
LVL 68

Expert Comment

by:woolmilkporc
Comment Utility
Did you run the query I gave you?
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:ibmsddk
Comment Utility
No Solution obtained
0
 
LVL 68

Expert Comment

by:woolmilkporc
Comment Utility
Doesn't my query do what you expected?
0
 

Author Comment

by:ibmsddk
Comment Utility
i need the count in NOS as per status....
0
 
LVL 68

Expert Comment

by:woolmilkporc
Comment Utility
Here you go.

select  -       count(events.node_name) "# of Nodes",  -       nodes.platform_name,  -       events.status  - from  -       events, nodes  -  where  -       events.node_name=nodes.node_name  -   group by  -       events.status, nodes.platform_name



0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
Comment Utility
Here is the same for yesterday 00:00:00 to  23:59:59 - will take a lot longer because of the dynamic table construction:
select  -
       count(events.node_name) "# of Nodes",  -
       nodes.platform_name,  -
       events.status  -
 from  -
       events, nodes  -
  where  -
      ((scheduled_start >= '2010-01-01' -
   and   scheduled_start >= timestamp(current date - 1 day, '00:00:00')) -
   and  (scheduled_start >= '2010-01-01' -
   and   scheduled_start <= timestamp(current date - 1 day, '23:59:59'))) -
   and   events.node_name=nodes.node_name  -
     group by  -
         nodes.platform_name, events.status

Please don't be astonished - you actually need the additional date restrictions ("2010-01-01") to initiate the dynamic table construction!
wmp
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Problem We are doing a daily copy of data in file system in Linux manually and I want to automate the same . We need many features in this automation:    1. We want to be able to exit in case of errors    2. We want the copy to happen via …
Life is full of imperfections – we all know it. Sometimes bad things happen to people for no particular reason. As they say: “it happens”. All we can do is to find a way to make some unavoidable situations… avoidable. Every kind of hardware has i…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now