Re: DBPROB for Session timeout



Frank (Frank@xxxxxxxxxxxxxxxxxxxxxxxxx) writes:
I am aware of three timeout-PropVals:

1. DBPROP_INIT_GENERALTIMEOUT
2. DBPROP_COMMANDTIMEOUT
3. DBPROP_INIT_TIMEOUT

Which one of these values sets the timeout for a SQLServer-Session? The
problem I am facing: I am using SQLExpress with my application on the same
computer (*not* remote). When the computer goes into sleep-mode and then
wakes-up a few hours later the session has expired.

Error report as follows:

Microsoft OLE DB Provider for SQL Server
Description: Timeout expired
GUID: {0C733A8B-2A1C-11CE-ADE5-00AA0044773D}

I don't know which of the timeouts that is, but whichever, I don't think
you want to make it longer. That is, what happens is that when the machine
goes to sleep, the connection is severed. Your application is not aware
of that, and first command it issues stalls, and when there is no reply
spon the other end, it eventually produces the message.

If you have SQL Server Mangement Studio, Express or "big" version,
installed, you can test this by open a query window, put the computer
to sleep, and then when it wakes up, the window will say "not connected".


--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.



Relevant Pages

  • Re: Check Linked Table Connection
    ... That will only test to make sure the connection is available. ... Run the query with a 20 second timeout. ... but I don't have any direct access to their SQL Server nor their ... I am an outside programmer that end-users contract, ...
    (comp.databases.ms-access)
  • Re: Timeout Expired
    ... So the timeout occurs during the bulk load operations? ... did you check the SQL Error Logs to see more clues about the timeout problem if there is any? ... locked for DML operations by SQL Server. ...
    (microsoft.public.sqlserver.server)
  • Re: Increase Connection Command timeout globally
    ... Hitchhiker's Guide to Visual Studio and SQL Server ... in Stored procs which is causing it to timeout. ... Connection and Command timeout settings are done on the client. ... I expect you'll have to visit each Command object declaration and set the ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: SQL Timeout Errors - Can Anyone Help?
    ... The timeout period elapsed prior to completion of the ... SQL Server does not time out. ... and you get further blocking and timeout. ... There are two possible reasons why a query takes more than 30 seconds ...
    (comp.databases.ms-sqlserver)
  • Re: How does one set read-uncommitted on the entire DB?
    ... queries to determine if the locking will become less of a problem. ... All client APIs permit you to set the timeout, ... Note that query timeout is unrelated to SQL Server. ...
    (comp.databases.ms-sqlserver)

Loading