You created a job to run two SQL statements every day at 1:00pm. When you checked your job (Jobs view in Teratrax Database Manager) the next day, you noticed that it says “Failed” under “Last Run Status”.
Run the following SQL command (copy command and paste it in the SQL window in Teratrax Database Manager or Teratrax Source Guard) to determine the cause of failure. It returns the job history of the specified job (replace job name with the name of your job):
EXECUTE MSDB.DBO.SP_HELP_JOBHISTORY NULL,
'job name', @MODE = N'SEM'
Result:
step_id | step_name | message | run_status | etc… |
---|---|---|---|---|
0 | (Job outcome) | The job failed. The… | 0 | etc… |
1 | Step1 | Executed as user… | 0 | etc… |
The message cell contains the error messages that were recorded at the time the job ran. If the job was successful, the cell will still indicate the success status.
Beekeeper Studio Is A Free & Open Source Database GUI
Best SQL query & editor tool I have ever used. It provides everything I need to manage my database. - ⭐⭐⭐⭐⭐ Mit
Beekeeper Studio is fast, intuitive, and easy to use. Beekeeper supports loads of databases, and works great on Windows, Mac and Linux.
What Users Say About Beekeeper Studio
"Beekeeper Studio completely replaced my old SQL workflow. It's fast, intuitive, and makes database work enjoyable again."
"I've tried many database GUIs, but Beekeeper strikes the perfect balance between features and simplicity. It just works."