Windows – Reviewing Services Start and Stop Times via Event Viewer & Log Parser Studio

Background

Received an Incident this morning stating that out Power BI Gateway Service was done.

Spent a bit of time trying to see what brought the service down.

Code


/*  
   Service Start and Stop Time
*/
SELECT 
             TimeGenerated
           , TO_STRING(TimeGenerated, 'yyyy-MMM-dd hh:mm tt') as [Timestamp] 
           , Message as [MessageLogged]
           , Strings as [StringsRaw] 
           , SUBSTR(Strings, 0, LAST_INDEX_OF(Strings,'|'))  as [ServiceName] 
           , SUBSTR(Strings, ADD(LAST_INDEX_OF(Strings,'|'), 1) , Strlen(Strings)) as [ServiceStatus] 

FROM '[LOGFILEPATH]'

where
     (
          ( EventID = 7036 )
          and 
          (
                 ( Message like '%SQL%' )
              or ( Message like '%gateway%' )


          )
  
     )

ORDER BY
      TimeGenerated desc


Output

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s