SQL Server Agent Jobs

Source: Internet
Author: User
(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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.