(1) The jobs in the MS SQL Agent are saved in the msdb database, and the job list can be queried by the following SQL statement
select * from msdb.dbo.sysjobs
(2) MS SQL Agent job history is also saved in the msdb database, and the job history list can be queried by the following SQL statement
select * from msdb.dbo.sysjobshistory
(3) The operation timetable can be queried by the following SQL statement
select * from msdb.dbo.sysjobschedules
(4) The last execution of the job can be queried by the following SQL statement
select * from msdb.dbo.sysjobservers
(5) The following SQL statements can query the job execution steps, execute commands and other list information
select * from msdb.dbo.sysjobsteps
(6) The above query can also be obtained through the combination of conditions more intuitive results, because I just learned and understand SQL, specific statements have yet to be researched and summarized;
(7) By default, the MS SQL Agent left and right job history is 1000 rows, up to 100 rows per job,
Therefore, if the job is more, it will cause you to see the history of each job is not the same, the record start date is not the same, some jobs even empty records, in order to improve the above problems, by adjusting the job history size to improve, the adjustment method is as follows:
On the SQL Server Agent, right-click Properties, and then select history to modify the size of the job history log in the right form content.
After the modification is completed, it will be effective.
SQL Server Agent Jobs