Recent Posts

Friday 24 May 2013

Server up time and Last Inventory Report - Customized Using SCCM 2012.

01:31

Image

Well !! Most of us are worried about whether our server had a sudden reboot !! Though there are many tools that can be used to Monitor the same , however if in case you do not have any of these tools then the same can be monitored using the below script :

 

SELECT

os.Caption0 as ‘Server Type’,

cs.Name0 as 'Server Name',

DateDiff(hour,os.LastBootUpTime0,ws.LastHWScan) as 'Uptime (in Hours)',

os.LastBootUpTime0 as 'Last Reboot Date',

ws.LastHWScan as 'Last Hardware Inventory'

FROM v_GS_COMPUTER_SYSTEM cs

INNER JOIN v_GS_Operating_System os

ON cs.ResourceID = os.ResourceID

LEFT OUTER JOIN v_GS_WORKSTATION_STATUS ws

ON ws.ResourceID = os.ResourceID

WHERE os.Caption0 LIKE '%server%'

AND ws.LastHWScan <> 0 AND cs.Name0 IS NOT NULL

 

Written by

We are Creative Blogger Theme Wavers which provides user friendly, effective and easy to use themes. Each support has free and providing HD support screen casting.

0 comments:

Post a Comment

 

© 2013 Learn IT " The Easy Way " . All rights resevered. Designed by Templateism

Back To Top