![]() |
|
|
By: Greg Robidoux | Read Comments | Print Greg is the President of Edgewood Solutions and a co-founder of MSSQLTips.com. Related Tips: More |
|
Problem
SQL Server Agent has a lot of great information stored in the system tables and the GUI provides a nice way of retrieving and viewing the data, but it does not always give you the data the way you would like it displayed. From a high level it is nice to see the current status of all jobs and the last run status of the jobs, but what if you want to see additional information or the data displayed in a different format. On a one by one basis you can get this information from the GUI, but it is not very easy to correlate this data across jobs or even across different time periods.
Solution
As like most things in SQL Server, the data used for both system and user applications is stored in tables and is accessible via queries or stored procedures. The data used for SQL Server Agent is just like most other processes where all the data is stored in tables and accessible. The following shows a list of the different system tables, views and stored procedures that are used to store and display data about SQL Server Agent jobs. All of these objects are stored in the MSDB database. All of these objects are specific to SQL Server 2005, but some of these objects also exist in SQL Server 2000. Check out books online for specific tables and stored procedures that relate to SQL Server 2000.
System Tables
Views
System Stored Procedures
Summary
Now that you have this additional information about where SQL Server Agent data is stored as well as how to access the data, begin building your own processes to gather data about your job runs, scheduling and job information.
Next Steps
| Share: | Share | Tweet |
|
![]() |
|
|
Connect with MSSQLTips.com |
|
privacy | disclaimer | copyright | advertise | about authors | contribute | feedback | giveaways | user groups Some names and products listed are the registered trademarks of their respective owners. Edgewood Solutions LLC | MSSharePointTips.com | MSSQLTips.com |