SQL Server log File viewer prompt timeout connection

Source: Internet
Author: User

A problem that came up this morning, because it was solved, so I'm going to write a technical reserve, and, incidentally, provide a helping hand to others who have encountered problems like me but don't know how to solve them.

Do not know if anyone has encountered this problem, open the job history to view the time when the hint timed out, such as:

But what's more, some of the job history can be queried normally, such as:

Spent a morning of time Niang did not find similar problems and reasons, and to add the technical group inside asked, you great God very enthusiastic help, although not get concrete solution, but from a great God got a little inspiration, It is possible that the history of too many problems caused by the problem (in fact, when I see the connection time-out, I should think of the >_<), and then try to hold the psychology of the history of the data to clean up, it is really this cause, and finally can be queried, at that time the happy AH , would have almost given up treatment, well, nonsense not much to say, the following is the solution:

1. You can query the number of history of related jobs by using the following SQL statement:

Select COUNT (*) from Msdb.dbo.sysjobhistory
where job_id= (select job_id from msdb.dbo.sysjobs where [name]= ' Job name ')
and run_date>20150801

Run_date: Date

PS: Because the query was just started with the following SQL statement:

SELECT * FROM Msdb.dbo.sysjobhistory
where step_id=0 and job_id= (select job_id from msdb.dbo.sysjobs where [name]= ' Job name ')
and run_date<20150801

Because I added a step_id query condition, so the first time cleaning did not clean up, the actual amount of data is still very large, because only delete a state of the

2, to delete:

Delete from Msdb.dbo.sysjobhistory
where job_id= (select job_id from msdb.dbo.sysjobs where [name]= ' Job name ')
and run_date<20150801

Because my job executes very frequently, once a minute, so the amount of data is very large, if you have the following settings (specific configuration to see the requirements) should not occur this problem.

Above, the first time to write this technology paste (probably called this?) ), so if there are any errors welcome you to point out, we can also be amended. >_<

SQL Server log File viewer prompt timeout connection

Related Article

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.