SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 API to hook into query details and kill query
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

rregnier
Starting Member

1 Posts

Posted - 11/06/2013 :  11:48:55  Show Profile  Reply with Quote
Periodically our application experiences large memory spikes due to faulty coding. I would like to configure SQL Server so that any query that is returning more than X MB of memory should be terminated with a special message indicating that the query was terminated in order to protect the application server from a memory explosion. Does such a tool exist? Are there APIs that I can hook into to write such a tool? Same thing for queries that are taking longer than X seconds, have SQL Server kill them.

TG
Flowing Fount of Yak Knowledge

USA
6062 Posts

Posted - 11/06/2013 :  12:05:13  Show Profile  Reply with Quote
Are you trying to limit the amount of memory a given statement is consuming on the sql server?
Or are you trying to limit the amount of data that is returned to the application server?

In either case I don't know of a server setting to limit that. Closest thing I can think of is "query governor cost limit" but that is more of a time limit thing.

>>due to faulty coding
I'm afraid your best option is to fix the code. Is this in-line sql in application code or are you calling stored procedures?

Be One with the Optimizer
TG
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000