SQL Server and DMO using ADODB

212 Views Asked by At

I'm maintaining a legacy server app that generate DMO files from SQL Server views.

Sometimes the server crashes because SQL Server consumes all cpu resources.

Using the SQL Server monitor I see that the problem is in SQLDMO connections that are consuming all cpu time and blocking the server.

I don't understand the reason of that because the dmo connection is with TRANSACTION LEVEL READ UNCOMMITTED and these SQLs never finish, during weeks. The only solution is to shutdown the server.

1

There are 1 best solutions below

0
SchmitzIT On

I would suggest looking into the code why these connections are not closed. I'm guessing there's no proper closing at the end or something along those lines.

If that is not an option, you could consider running a scheduled job that kills off these specific jobs every so often if they ran for longer than say, 24 hours.