Video Screencast Help

SQL Script to check Task Status on EV servers

Created: 09 Jun 2014 • Updated: 11 Jul 2014 | 3 comments
Saswata Basu's picture
This issue has been solved. See solution.

Hi All,

I am trying to create a script to monitor the Task status of various Archiving task like Mailbox/Journal/PST running on multiple EV servers in same EV Site.

I looked at the Task.dbo table in EVDirectory DB but could find relevant column to run the query. Can anybody help me with this?

Thanks in Advance.

Operating Systems:

Comments 3 CommentsJump to latest comment

TonySterling's picture

I don't think you will be able to do that via SQL.

This article should give you some good insights into monitoring.

https://www-secure.symantec.com/connect/articles/n...

 

JesusWept3's picture

You can do a script like this, but the problem is that I don't know what the status codes are
I'm assuming 0 is stopped, 1 is running, 254 is processing, but the others for Error, Failed, Starting, Stopping etc.

It should update every 5 minutes i believe

SELECT CE.ComputerName, T.Name, TM.Status, TM.EntryTime
FROM   EnterpriseVaultDirectory.dbo.ComputerEntry CE,
       EnterpriseVaultDirectory.dbo.Task T,
       EnterpriseVaultMonitoring.dbo.TaskMonitoring TM
WHERE  TM.ComputerEntryID = CE.ComputerEntryId
  AND  TM.TaskID = T.TaskEntryId

There is also this powershell written by Nathan Clarke that will query the status directly, but is in no way related to SQL

https://www-secure.symantec.com/connect/forums/mon...

 

 

SOLUTION
Manoj Chanchawat's picture

Hey Jesus,

The task status may be any of the following (Task status and their ID's)

  STOPPED = 0,
  RUNNING = 1,
  PAUSED = 2,
  DISABLED = 3,
  LOADING = 4,
  STOPPING = 5,
  FAILED = 6,
  REFRESHING = 7,
  CONTROLLER SVC NOT RUNNING = 8,
  ERROR = 9,
  COMPLETED = 10,
  COMPLETED WITH ERRORS = 11,
  QUEUED = 12,
  NOT IN SCHEDULE = 13,
  WAITING FOR USER NTERACTION = 14,

This is up to 10.0.4 GA. I need to check if there is any change there after.