cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ahandler
Engaged Sweeper
If i start server - i get this error in errorlog. Clients cannot get connection so server.

#####################################################

28.02.2008 09:16:56
System.Data.SqlClient.SqlException: Cannot open database "Lansweeper" requested by the login. The login failed.
Login failed for user 'lssqluser'.
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
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()
at Lansweeper30.starter.startsweeper()

#####################################################

If i stopp service and start it again, there is no error.

Looking forward for an answer.

Regards Andreas
22 REPLIES 22
Hemoco
Lansweeper Alumni
Are you running this on a vmware server or a physical server?
ahandler
Engaged Sweeper
Hello

complete new Comupter, new system - W2K3 Server SP2

SQLExpress,

Same error - System.Data.SqlClient.SqlException: Cannot open database "Lansweeper" requested by the login. The login failed.

But why?

If i log in manually, and restart the service it works!!!

Regards Andreas
ahandler
Engaged Sweeper
I try to set up a new server - and test if it is working - tell you if finished...
Hemoco
Lansweeper Alumni
This may be an awful workaround but you can try it anyway 😉

1)Set the lansweeper service to manual

2) Create a vbs/bat file that does this (in pseudocode)
Wait 30-60 seconds
Start service lansweeper

3) Create a scheduled job that should be started at system startup which point to the vbs/bat file
ahandler
Engaged Sweeper
May be, but why? Are there any logfiles i can sent to you?
Hemoco
Lansweeper Alumni
You seem to be the only one experiencing this behaviour.
ahandler
Engaged Sweeper
I addes also the SQLBrowser but this has also no effect.

-------------------------------------------------------------------------
28.02.2008 13:50:54
System.Data.SqlClient.SqlException: Cannot open database "Lansweeper" requested by the login. The login failed.
Login failed for user 'lssqluser'.
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
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()
at Lansweeper30.starter.startsweeper()
-------------------------------------------------------------------------

Again the same error - on restart the service - service is working.

Strange...
Hemoco
Lansweeper Alumni
Maybe also add the sql server browser service to the list of dependent services. (SQLBROWSER)
ahandler
Engaged Sweeper
I think, to delay the service autostart is the right way, but the delay is to small.

May be, there is another posibility.

Regards Andreas
ahandler
Engaged Sweeper
Thanks for your answer - something changed, but client still fails.

For you Information - I am using "MSSQL$SQLEXPRESS"

There is now following answer in Error log:

System.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - Der angegebene Netzwerkname ist nicht mehr verfügbar.)

Der angegebene Netzwerkname ist nicht mehr verfügbar means - the given networkname is no longer availible

Restart Service - then it works - Client Success


Do you also sell premium support for austia?

Regards Andreas