Advertisement

05.26.2008 at 11:47PM PDT, ID: 23434013
[x]
Attachment Details

"Query Options" in SSMS changing the settings of my Sql Server

Asked by majidbhatti in MS SQL Server

Tags: Microsoft, SQL Server 2005, 2005

To avoid DB LOCKS i have set my SQL Server LOCK_TIMEOUT to 10,000 (10 sec) but from many days, i observed that it automatically kept changing to -1 (no time out) and i kept receiving calls from my users that some process are locked.

I tried to investigate that how it gets changed by using Profiler and found that every time i open Microsoft SQL Server Management Studio and press New Query; it automatcally sends following command to the SQL Server SETTING all the values including LOCK_TIMEOUT..


SET ROWCOUNT 0 SET TEXTSIZE 2147483647 SET NOCOUNT OFF SET CONCAT_NULL_YIELDS_NULL ON SET ARITHABORT ON SET LOCK_TIMEOUT -1 SET
QUERY_GOVERNOR_COST_LIMIT 0 SET DEADLOCK_PRIORITY NORMAL SET TRANSACTION ISOLATION LEVEL READ COMMITTED SET ANSI_NULLS ON SET
ANSI_NULL_DFLT_ON ON SET ANSI_PADDING ON SET ANSI_WARNINGS ON SET CURSOR_CLOSE_ON_COMMIT OFF SET IMPLICIT_TRANSACTIONS OFF SET
QUOTED_IDENTIFIER ON

My question is that why it SETS the server values? I went to Query Options and tried to change but it changes only for the current query screen, if i close/open the query window, it again runs the below commands SET LOCK_TIMEOUT -1. Can anyone help me in this? Start Free Trial
 
Loading Advertisement...
 
[+][-]05.27.2008 at 12:12AM PDT, ID: 21649923

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.27.2008 at 03:58AM PDT, ID: 21650797

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.27.2008 at 04:28AM PDT, ID: 21650906

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MS SQL Server
Tags: Microsoft, SQL Server 2005, 2005
Sign Up Now!
Solution Provided By: patrikt
Participating Experts: 1
Solution Grade: B
 
 
[+][-]06.03.2008 at 10:30PM PDT, ID: 21707195

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 12:33AM PDT, ID: 21707663

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628