Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Timeout expired error executing a simple View in SQL Serve..

 
   Database Forums (Home) -> Connect RSS
Next:  invalid server name error  
Author Message
Mark

External


Since: Jan 24, 2006
Posts: 3



(Msg. 1) Posted: Wed Jan 23, 2008 6:00 pm
Post subject: Timeout expired error executing a simple View in SQL Server 2005 Express SP2
Archived from groups: microsoft>public>sqlserver>connect (more info?)

Hi

We are building a SQL Express database for embedded use in our application
and hitting problems executing simple Views executed from SSQL Server
Management Studio Express SP2 (SSMSE) and from Access XP via ODBC.

The MDF has a single table with 20 or so fields that are mainly text (100
char), plus a couple of datetime fields and an integer field as the primary
key that auto-increments. The table has over 7m (million) rows and the MDF
is close to capacity at 3.9Gb. Aside from the PK field, only the datetime
and integer fields are indexed.

Next we started to create Views with various filter criteria to assess
performance and immediately hit problems with query timeouts with simple
criteria such as LogDate >= 1/1/2008 AND <= 1/2/2009 (dates shown as entered
into the grid rather how the appear in the Where clause)

The error we get is:

SQL Execution Error. Timeout Expired. The timeout period elapsed prior to
completion of the operation or the server is not responding.

Simplifying the criteria to [LogDate] > 1/1/2008 quite happily returns all
7m rows but [LogDate] = 1/1/2008 gives a timeout error. But [LogDate] <>
1/1/2008 returns everything EXCEPT 1/1 as you'd expect.

Ok, we thought maybe this is date field specific but criteria against an
integer field generates the same error: [IntegerField]=22 fails whilst
[IntegerField]<>22 works as does [IntegerField]>22.

Althought the error message is consistent the results returned do vary from
View to View (each View having different criteria applied); in some cases no
records are retrieved and the error is quick, in other cases the View
appears to be nearly complete before failing on the last hundred or so rows.
With some criteria this might be 5,000 rows and with other it might be
500,000. Saving and re-running any given View many times gives consistent
results every time for that View, i.e. the results and the error are the
same every time whilst the View is unchanged.

Any amount of criteria against text fields seems to produce the results we
would expect but simple criteria against datetime and numeric fields mostly
fail.

We've increased the various timeouts available in SSMSE (up 600 seconds
mainly) but we get timeout errors occuring after anything from 18 seconds up
to 2.5 minutes, depending on how many rows get returned before each View
fails. We've added, removed and rebuilt the indexes but nothing has any
impact.

In an attempt to isolate SSMSE we ran same tests from MS Access XP via an
ODBC "linked table" and get same errors there. Access quite happily pulls
across all 7m rows from the table but ttrying to connect to the Views that
timeout in SSMSE also cause a timeout when opened from Access.

BTW, I should add that taking the SQL from any of the failing Views and
executing as a Query in SSMSE works jsut fine without any timeouts and
returns the exprected number of rows... this suggests it's not a basic
syntax issue.

After trawling the web and following every lead we're at a dead end. Common
sense tells me that SQL Expr would be of very limited utility without Views
to filter the data and that we must be doing something wrong... but I sure
can't see what after many days of looking at this issue and any pointers
from a seasoned user would be *extremely* welcome.

Thanks in advance.

Mark

 >> Stay informed about: Timeout expired error executing a simple View in SQL Serve.. 
Back to top
Login to vote
Kent hand

External


Since: Feb 11, 2008
Posts: 1



(Msg. 2) Posted: Mon Feb 11, 2008 10:20 am
Post subject: Re:Timeout expired error executing a simple View in SQL Server 2005 Express SP2 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Having similiar issue. Simple query in SQL 2005 express works fine and times
out in a view.

Changed all time out settings (connection and command) by not working. Do
not believe this is the problem.

Just wondering if you learned anything that may help.

Kent

url:http://www.ureader.com/msg/11431407.aspx

 >> Stay informed about: Timeout expired error executing a simple View in SQL Serve.. 
Back to top
Login to vote
christophe.grasso

External


Since: Apr 03, 2008
Posts: 1



(Msg. 3) Posted: Thu Apr 03, 2008 2:04 am
Post subject: Re: Timeout expired error executing a simple View in SQL Server 2005 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Had exactly the same problem !

Here the answer :

This timeout setting value is configurable through the DWORD value
SQLQueryTimeout at HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL
Server\90\Tools\Shell\DataProject.

http://blogs.msdn.com/ialonso/archive/2007/12/04/sql-execution-error-t...out-exp
 >> Stay informed about: Timeout expired error executing a simple View in SQL Serve.. 
Back to top
Login to vote
Display posts from previous:   
   Database Forums (Home) -> Connect All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]