Solved

MS SQL 2005 query governor

Posted on 2006-07-19
4
968 Views
Last Modified: 2012-06-21
If i check the "use query governor to prevent long running queries" and set a time limitunder  Connections in the SQL server properties of the MS SQL SErver Management studio - will this kill the queries that are causing blocking and/or become blocked when they exceed the running time?
0
Comment
Question by:martini60123
  • 2
4 Comments
 
LVL 12

Expert Comment

by:Einstine98
ID: 17143895
good question, well, yes but I never tested it ;-)
0
 
LVL 3

Expert Comment

by:chhapia_chintak
ID: 17143904
Query governor setting simply does not execute the query. It detects the problem BEFORE it occurs.
0
 
LVL 12

Expert Comment

by:Einstine98
ID: 17143949
hey... that's true... but such an unused feature in my domain!!!! it works based on the estimated excution time (not actual).
0
 
LVL 27

Accepted Solution

by:
ptjcb earned 250 total points
ID: 17145591
Yes, chhapia_chintak is right - the query governor will estimate how long the query will take to produce results and it will not run the query if it is longer than your proposed time.  This can be a saving grace for those ad hoc queries but if a query legitimately needs to run long then it will not run at all. Be prepared.

For blocks and deadlocks you could add Try/Catch to your stored procs - this link will give some examples: http://www.sql-server-performance.com/art_deadlock_sql_2005.asp
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now