September 6, 2007 at 8:45 am
Hi
I'm a developer not a DBA so excuse me if I'm asking a really obvious question.
Is there a way to impose CPU or locking limits on a query so a user on a query analyser session can't effectively disable the database with a badly thought out query. (I think the specific problem we had was to do with generating excessive locks on the main order table, so virtually no other process could do anything on the table)
I remember many years ago working on an Oracle database and occassionally it would reject my queries with a message to the effect that the query would take too long to process, or would produce too many results. I wondered if there was something similar available in SQL Server - before a query is executed, a plan is created and at that stage SQL server has a rough calculation of the resouces required to run a query and could then check to see if this amount of resource is allowed by the user?
Thank in advance
Tom Brown
September 6, 2007 at 11:29 am
You can use a table hint with (nolock)
Example: select col1,col2 from table1 with (nolock)
Search books online for more table hints.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply