Is there a reliable way to do this?
- From: "Elizabeth Connolly" <econnolly@xxxxxxxxxxxxxx>
- Date: Tue, 9 Oct 2007 16:05:13 -0500
What is a reliable way to check to ensure that all system DBs are started
when SQL Server (SQL Express) starts up?
I am using SQL Express 2005 for a desktop application in which the user
requires the application be started at windows log-in time (so that nothing
is ever visible on the desktop except the application.) Starting the
application involves opening connections to two application databases.
When the application is started from the user's startup folder - that is,
right after log-in - there are often login failures reported by
..NetSQLClientData Provider - "Cannot open database [dbname] requested by the
login. The login failed. Login failed for user ...."
There are never any failures when started manually after login.
To deal with the things I THOUGHT might be causing this I made the
application check that the SQL Express service was running, and increased
the length of the connection time-out in the connection string. Appears that
these were not the cause of the problem. Examining the SQL log shows that on
startup, SQL Server has to start all its internal databases. It looks like
if this process is not complete (usually it is the last db, tempdb, that
isn't done with its startup) my first connection fails. I suppose I could
hardcode or put in the configuration settings some sort of wait, or
repeatedly try to open the connection if the first time fails. But it seems
like it would be safer to just know the status of the system dbs.
So, is there a way to do this?
Thanks!
Elizabeth
.
- Follow-Ups:
- RE: Is there a reliable way to do this?
- From: Saleem Hakani
- Re: Is there a reliable way to do this?
- From: Allen Kinsel
- RE: Is there a reliable way to do this?
- Prev by Date: Re: Linked DB2/400
- Next by Date: Re: Is there a reliable way to do this?
- Previous by thread: Linked DB2/400
- Next by thread: Re: Is there a reliable way to do this?
- Index(es):
Relevant Pages
|
Loading