I'm trying to programmatically gather backup history from the Backup Exec 12.5 database. I think I can get this from the JobHistoryDetail table, but that's a guess (Please correct me if I'm wrong on that).

Can anyone tell me how I can determine whether jobs in the JobHistoryDetail table completed successfully or failed? There are a number of columns that contain integer statuses, errors, etc, that look promising - but I don't know what any of the numbers map to (success? failure? cancel?).

Or is there any documentation for the database? I'm operating on a LOT of guesswork.

1 Answer
1

Below you'll find a list of status codes for the "Final Job Status" field in the BEDB database. I used Excel (of all things) to connect to the data using its data connection features. If you know of another way to connect to SQL, use it.

I connected to the "[Server_Name]\BKUPEXEC database and used the BEDB datafile. Within that database is a table called "vwJobHistory" and a field called 'Final Job Status'.

Hope this helps.

JOB_STATE_CANCELED = 1 The job has been terminated because it was canceled.

JOB_STATE_COMPLETED = 2 The job has completed and is waiting for final disposition.

JOB_STATE_SUCCESS_WITH_EXCEPTION S = 3 The job has completed successfully with some exceptions.

JOB_STATE_DISPATCHED = 4 The job has been dispatched.

JOB_STATE_HOLD = 5 The job is on hold.

JOB_STATE_ERROR = 6 The job has completed with an error.

JOB_STATE_INVALID SCHEDULE = 7 The schedule for the task is invalid. The job will never run.

JOB_STATE_NOT_IN_WINDOW = 10 The job's scheduled time window closed before the job could be dispatched. There may not have been an available device during the time window.

JOB_STATE_READY_BUT_PAUSED = 11 The job is ready, but the media server is paused.

JOB_STATE_PENDING = 12 The job is in a transitional state.

JOB_STATE_RECOVERED = 13 During startup, Backup Exec detected that a job was active when the server was shut down, and that the Checkpoint restart option was not enabled for this
job. The job history log has been marked JOB_STATE_RECOVERED, and the job has been scheduled to restart immediately

JOB_STATE_RESUMED = 15 During startup, Backup Exec detected that a job was active when the server was shut down, and that the Checkpoint restart option was enabled for this job.
The job history log has been marked JOB_STATE_RESUMED, the job has been scheduled to restart immediately, and the job flag has been set to indicate checkpoint restart.

JOB_STATE_ACTIVE = 16 The job is currently running on the server.

JOB_STATE_READY = 17 The job is eligible for dispatch.

JOB_STATE_SCHEDULED = 18 The job has a due date in the future.

JOB_STATE_SUCCESS = 19 The job has been completed successfully.

JOB_STATE_SUPERCEDED = 20 The job is ready, but another higher precedence task is eligible to run.

JOB_STATE_THRESHOLD_AUTO_ABORT =21 The job was canceled because it was not completed within the number of hours or minutes that were set for the Enable automatic cancellation option on the job schedule.

JOB_STATE_TO_BE_SCHEDULED = 22 The job needs to have the due date calculated.

JOB_STATE_LINKED_JOB = 23 The job is linked to another job, and will not start until that job is finished