Solved

MS SQL 2005 query governor

Posted on 2006-07-19
4
977 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

839 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