Link to home
Create AccountLog in
Microsoft SQL Server 2008

Microsoft SQL Server 2008

--

Questions

--

Followers

Top Experts

Avatar of ttist25
ttist25

How to set connection timeout property in SQL Server Management Studio 2008
Hello there,

I'm having some trouble with timeout issues in my ASP.NET application.  I'm getting the following error when running a query:

Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

This query used to work but I think my data set has just grown too large and it's timing out.  I tried setting my connection string to include Connection Timeout=0 but that didn't help.

When I look at the properties of the database from SQL Server Management Studio (right click the database, click Properties, and then click "View connection properties") the Connection Timeout is set to 15.  I'm not able to change this value here as it's read only from this view.  

My question is - should I be trying to change this value in SSMS to try to fix this error and, if so, how can I modify it?

I'm a real hack when it comes to this so please don't assume any knowledge.  :)

Thanks!

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]Guy Hengel [angelIII / a3]🇱🇺

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Avatar of HainKurtHainKurt🇨🇦

try increasing this

HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\90\Tools\Shell\DataProject\SQLQueryTimeout

Avatar of ttist25ttist25

ASKER

myCommand.CommandTimeout = 0 seems to have taken care of it.

THanks!

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.

Microsoft SQL Server 2008

Microsoft SQL Server 2008

--

Questions

--

Followers

Top Experts

Microsoft SQL Server 2008 is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning. Major improvements include the Always On technologies and support for unstructured data types.