Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Backup status

Posted on 2010-09-16
9
Medium Priority
?
683 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
ID: 33701277
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
ID: 33736918
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
ID: 33736983
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
Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

 
LVL 68

Expert Comment

by:woolmilkporc
ID: 33737020
Did you run the query I gave you?
0
 

Author Comment

by:ibmsddk
ID: 33887373
No Solution obtained
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 33887720
Doesn't my query do what you expected?
0
 

Author Comment

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

Expert Comment

by:woolmilkporc
ID: 33924139
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 1500 total points
ID: 33928060
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is an update and follow-up of my previous article:   Storage 101: common concepts in the IT enterprise storage This time, I expand on more frequently used storage concepts.
In this article we will learn how to backup a VMware farm using Nakivo Backup & Replication. In this tutorial we will install the software on a Windows 2012 R2 Server.
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…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…
Suggested Courses

926 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