-
July 30th, 2007, 10:20 PM
#1
SQL timeout issue
I'm using SQL express and during my application startup, i do a basic query to the database.
(e.g select column1 from table1)
This table only has 30 records but the rest of the tables has many. Because my app runs the query to this table first, i get the error. My database size is 2.0 GB (i know it's huge)
My timeout limit i set is 60 seconds. IS there any other solution for this rather than increasing the timeout value?
This timeout issue only happens on and off... but not always. I'm using C# with .Net 2.0.
Thanks
Back after a long hibernation.
-
August 3rd, 2007, 04:01 AM
#2
Re: SQL timeout issue
How much data does this query return? thousands of rows?
Do you have right indexes on right columns if you use a where cluase?
can you consider paging data?
the more details you post the more hlp you can get
-
August 6th, 2007, 05:59 PM
#3
Re: SQL timeout issue
the table I'm quering only has 23 rows.
Back after a long hibernation.
-
August 8th, 2007, 03:14 PM
#4
Re: SQL timeout issue
can you post your connection string ?
I suspect that you attach the DB on connection...
Also external factors can affect the query. is the machine with SQL serve under big load?
you can check performance monitor to get some useful info.
-
August 8th, 2007, 04:17 PM
#5
Re: SQL timeout issue
Given the use of SQL Express, I am betting that this occurs when the SQLEngine has "idled down", and the long time is for a SQL restart. This can be confirmed [or eliminated] by PerfMon and the event log.
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
August 8th, 2007, 07:33 PM
#6
Re: SQL timeout issue
hspc,
This would be my connection string :
"Data Source=ABC;Initial Catalog=aaa;User Id=sa;Password=abc"
Back after a long hibernation.
-
August 10th, 2007, 03:28 AM
#7
Re: SQL timeout issue
newvista..
Connection string seems ok to me .. you should check the performance monitor and logs.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|