August 11, 2005 at 8:57 am
Dear Friends
I am using Sql server as DB for my ASP.NET application. My application works fine but randomly I am geting following error. I am not able trace why this problem persist.
Is this problem with network connection / Dot net sqlclient Connection object/ Sql server perfomance problem?
Error Message: SQL Server does not exist or access denied.
Stack Trace: at System.Data.SqlClient.SqlInternalConnection.OpenAndLogin()
at System.Data.SqlClient.SqlInternalConnection..ctor(SqlConnection
connection, SqlConnectionString connectionOptions)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
Please let me know if any one has solution for above problem.
Thanks
Sudarshan
August 15, 2005 at 8:16 am
Check the SQL Server Error log and the Windows Event Viewer Logs for any related error messages. Your connection might be timing out.
Are you sure you are passing the correct login/password EVERY time?
Check SQL Server, use Enterprise Manager, right click on the database, select Properties, go to the Options tab. Is the option Auto Close checked? If so, uncheck it.
-SQLBill
August 29, 2005 at 6:21 am
Hi,
We had exactly the same problem. Very weird. Sometimes a time out was achieved after 23 minutes. A workaround which kept the connection alive for every 10 minutes even failed after half an hour. And even when moving the thump fast in a DataGrid with thousands of records a complete other error occured (red cross in complete DataGrid). This error seems to be related, because after having used the solution mentioned below, this error disappeared too and moving the thump fast in the Grid was no problem anymore.
The real solution in our case was to extend the connection string with:
Network Library=DBMSSOCN;
and to extend the "data source =" in the connectionstring with:
,1234 (example: data source=10.0.0.123,1234)
Where 1234 is the port of your SQLServer. The default is 1433, but when this is different (like in our case), you have to mention it here.
I hope this works for you too.
Jeroen
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy