all groups > sql server connect > march 2006 >
You're in the

sql server connect

group:

SQL Server 2005 (MSDE) delay after starting services


SQL Server 2005 (MSDE) delay after starting services Shane32
3/1/2006 6:22:52 AM
sql server connect:
After starting the SQL Server Desktop Edition 2005 service, I can't
connect to it for a matter of up to 10 seconds (I get an authentication

failure). This is causing a problem in my dependent services, because
they then fail even though SQL Server is running. Is there a way to
configure SQL Server to wait until it is completely running before
returning control to the OS (which then starts the dependent services)?

Or, should I configure my program to use SQL authentication instead of
Windows authentication?

Right now I have both SQL Server and my program's services to run under

the Local Computer account. Also, I've never had this problem when
using my application with SQL Server 2000 (the MSDE version).

Has anyone had experience with this issue?

I've seen KB # 910892, but I've already configured my program to be
dependent on SQL Server. It fails even though SQL is already running
(for the first 10 seconds or so after SQL starts up).

Thanks in advance,

Shane
Re: SQL Server 2005 (MSDE) delay after starting services Roger Wolter[MSFT]
3/1/2006 7:59:32 PM
Chance are what you're seeing is the database your application connects to
is recovering for a few seconds after the SQL Server service starts. This
is normal. The amount of time this takes depends on the log, how the
database was shutdown, the recovery model of the database, etc. In the
services I have written, I generally looked for an error when attaching to
the database and retried the open every couple seconds until it succeeds.
There's really no way to make the service manager wait for the database to
recover before it starts your service because each database in the SQL
Server service will take a different amount of time to recover.

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

[quoted text, click to view]

AddThis Social Bookmark Button