I have a Report Server that runs SSRS 2008 R2 Standard. This server retrieves data from another SQL Server 2008 R2 (Standard again). I want 开发者_开发百科to manage the query priority on these SQL Standard servers, in a manner similar to Resource Governor.
Resource Governor is an Enterprise-only feature and I cannot afford to upgrade to that edition at the moment. Can you suggest an approach/tool to achieve this, even just to some basic degree: Account-based, CPU usage, query time-out?
It's possible to run a job that scans currently running tasks and tracks which ones are blocking or hogging resources. You can then kill different spids based on your own criteria. What that criteria is depends on your own business needs.
I hate to give the advice of "Google this", but there are several tools that can do this, each with varying levels of customization available or you can roll your own. The code for rolling your own can get a little complex. Anyway, if you Google "sql block monitor" or "sql spid monitor" you should find several possible solutions.
These solutions typically do not take into account CPU and/or memory though as the Resource Governor does. You can look at the actual code being run though (hopefully stored procedure calls) and base your decisions on that. From the description of your problem it seems like that might be what you're looking to do.
EDIT: Would this be better as a wiki, since it doesn't have a definitive answer? It could then serve as a collection of the various solutions which exist. Perhaps someone more involved in the SO site can comment on that.
精彩评论