Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - reboot each day to connect to a SQL Express Database

Reply
 
Old 04-01-2009   #1 (permalink)
zorpiedoman


 
 

reboot each day to connect to a SQL Express Database

here's a weird one...

I leave my computer on all night (usually I'm at it working, of course!)
Anyway, every day the FIRST time I try and connect to a local SQL Experss
database sitting in my App_Data folder, and it cannot connect. Nothing seems
to fix it except a complete reboot of my machine. Once I do that, I'm good
for another 24 hours.

Here is the error message:

An error has occurred while establishing a connection to the server. When
connecting to SQL Server 2005, this failure may be caused by the fact that
under the default settings SQL Server does not allow remote connections.
(provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance
Specified)"

Here is the stack trace:

at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection) at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj) at System.Data.SqlClient.TdsParser.Connect(ServerInfo
serverInfo, SqlInternalConnectionTds connHandler, Boolean
ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean
trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
timerExpire, SqlConnection owningObject) at
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host,
String newPassword, Boolean redirectedUserInstance, SqlConnection
owningObject, SqlConnectionString connectionOptions, Int64 timerStart) at
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance) at
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
identity, SqlConnectionString connectionOptions, Object providerInfo, String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection) at
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection
owningConnection, DbConnectionPool pool, DbConnectionOptions options) at
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
owningObject) at
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
owningObject) at
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
owningObject) at
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection) at
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) at
System.Data.SqlClient.SqlConnection.Open() ....

Nothing in the code changes, of course, it is the same connection string I
use after the reboot.

The only thing i can think of is a backup runs at night, and maybe it hangs
onto the file or something??

Anyone ever seen anything like this?
-zorpie

My System SpecsSystem Spec
Old 04-01-2009   #2 (permalink)
Miro


 
 

Re: reboot each day to connect to a SQL Express Database

before you try to connect, have you checked to see if the sqlservice is
actually running on the machine.

Im under teh assumption yours "stops", and on reboot it is set to "startup".

Miro

"zorpiedoman" <zorpiedoman@xxxxxx> wrote in message
news:52ED215A-672F-47B4-8F2A-CA6705113BBB@xxxxxx
Quote:

> here's a weird one...
>
> I leave my computer on all night (usually I'm at it working, of course!)
> Anyway, every day the FIRST time I try and connect to a local SQL Experss
> database sitting in my App_Data folder, and it cannot connect. Nothing
> seems
> to fix it except a complete reboot of my machine. Once I do that, I'm
> good
> for another 24 hours.
>
> Here is the error message:
>
> An error has occurred while establishing a connection to the server. When
> connecting to SQL Server 2005, this failure may be caused by the fact that
> under the default settings SQL Server does not allow remote connections.
> (provider: SQL Network Interfaces, error: 26 - Error Locating
> Server/Instance
> Specified)"
>
> Here is the stack trace:
>
> at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
> exception, Boolean breakConnection) at
> System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
> stateObj) at System.Data.SqlClient.TdsParser.Connect(ServerInfo
> serverInfo, SqlInternalConnectionTds connHandler, Boolean
> ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean
> trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
> at
> System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
> serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
> timerExpire, SqlConnection owningObject) at
> System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
> host,
> String newPassword, Boolean redirectedUserInstance, SqlConnection
> owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
> at
> System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
> owningObject, SqlConnectionString connectionOptions, String newPassword,
> Boolean redirectedUserInstance) at
> System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
> identity, SqlConnectionString connectionOptions, Object providerInfo,
> String
> newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
> at
> System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
> options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
> owningConnection) at
> System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection
> owningConnection, DbConnectionPool pool, DbConnectionOptions options)
> at
> System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
> owningObject) at
> System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
> owningObject) at
> System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
> owningObject) at
> System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
> owningConnection) at
> System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
> outerConnection, DbConnectionFactory connectionFactory) at
> System.Data.SqlClient.SqlConnection.Open() ....
>
> Nothing in the code changes, of course, it is the same connection string I
> use after the reboot.
>
> The only thing i can think of is a backup runs at night, and maybe it
> hangs
> onto the file or something??
>
> Anyone ever seen anything like this?
> -zorpie
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
'Connect' database for WLM? Live Mail
iis 5.1 can't connect to database server .NET General
connect to paradox db from sqlserver database table .NET General
Cannot connect to FoxPro database in Vista, IIS 7 General Discussion
Denied access to SQL Express database files Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46