I spent almost all morning tracking down a problem where an ASP.NET app would not connect to my Microsoft SQL server. It turns out that the solution I found also applies to failing ColdFusion MX JDBC Connections.
In ASP.NET, I kept seeing this message in my logs:[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. In ColdFusion, MSSQL datasources with correct connection information fail to verify.
I was pretty sure that all of my connection information was correct. My MSSQL Server was up and running, and I was logged into it using Enterprise Manager and Query Analyzer with the exact same information which were failing in .NET and ColdFusion.
I spent quite a bit of time messing around with a bunch of different settings in the SQL server and other places, but didn’t get anywhere. Out of desperation I did what I should have done first and Googled the error message. As a result I stumbled across this page. Apparently a lot of people have had this same problem for a variety of reasons.
I found the answer to the problem in the third to last comment on that page. Apparently, if you have an out of date version of the file DBNETLIB.dll Server 2003 and XP Service Pack 2 disables TCP/IP access to MS SQL Server. This is a defense against the Slammer worm.
To confirm this was the problem, I attempted to telnet to port 1433 on my localhost and could not. At this point, I was pretty sure I’d found the problem.
The solution to the problem was to go to this page on Microsoft.com and download the SQL Critical Update (SQLCritUpdPkg_ENU.exe). This update appears to deliver the needed DLL and, as a nice side effect, it patches you against the SQL Slammer worm.
After installing the patch I did a quick telnet to port 1433 and was able to connect. I then tried to use my ASP.NET app and, lo and behold, it worked just find. I also confirmed that JDBC connections to MSSQL from ColdFusion were now working and validating and I no longer had to use the (ugly) work around of ODBC.
Comments on: "One Solution to this error: SQL Server does not exist or access denied" (26)
[URL=http://kjixrtth.com]ueopexzs[/URL] gscovjkb http://yytahqnp.com cizwsugm tuzfltxi fskxkauq
LikeLike
[URL=http://wfyrumvi.com]hrdglloi[/URL] nhitowxx http://mzsibdlq.com mhbkdbef bmvrvvjh sprukpvf
LikeLike
[URL=http://ssbabtjt.com]lgkrkdpz[/URL] yvgvbzty http://rfobezpz.com cftvhlac edulhcbv zmvblppr
LikeLike
Hi Doug, thanks a lot for sharing! This helped us resolve our problems too! More power and share more! đ
~Mavi0725
LikeLike
Hi Doug, thanks a lot for sharing! This helped us resolve our problems too! More power and share more! đ
~Mavi0725
LikeLike
Hi Doug, thanks a lot for sharing! This helped us resolve our problems too! More power and share more! đ
~Mavi0725
LikeLike
Hi Doug, thanks a lot for sharing! This helped us resolve our problems too! More power and share more! đ
~Mavi0725
LikeLike
Hi Doug, thanks a lot for sharing! This helped us resolve our problems too! More power and share more! đ
~Mavi0725
LikeLike
Thanks a lot….. this fixes my problem.
Cool
đ
LikeLike
I am getting the same problem, and the big problem is I am using Sql server 2005, so ur solution fixes the eroor with 2000, so plz help me out for 2005.
-Azhar
LikeLike
SQL Server does not exist or access denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: SQL Server does not exist or access denied.
Source Error:
Line 28: SqlDataAdapter Sda = new SqlDataAdapter (“select * from areamaster”, Sqlcon);
Line 29: DataSet ds = new DataSet();
Line 30: Sda.Fill(ds,”area”);
Line 31: DataGrid1.DataSource=ds.Tables[“areamaster”].DefaultView;
Line 32: DataGrid1.DataBind();
Source File: c:inetpubwwwrootwebapplication1webform1.aspx.cs Line: 30
Stack Trace:
[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
System.Data.SqlClient.SqlConnection.Open()
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
WebApplication1.WebForm1.Page_Load(Object sender, EventArgs e) in c:inetpubwwwrootwebapplication1webform1.aspx.cs:30
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
LikeLike
Thanks a lot….. Now I can connect to the SQL Server.
LikeLike
Thanks it is very helpful advice from u
LikeLike
to fix in sql 2005 (at least this worked for me), go to your SQL Server Configuration Manager, SQL Server 2005 Network Configuration, Protocols, Enable TCP/IP, restart SQL Server and voila!
LikeLike
Thanks.it works
LikeLike
Thanks buddy,it did the trick đ
LikeLike
Thanks very much ! your post help us, with our problem.
Regards
LikeLike
Thanks very much ! your post help us, with our problem.
Thanks very much ! your post help us, with our problem.
Thanks very much ! your post help us, with our problem.Thanks very much ! your post help us, with our problem.Thanks very much ! your post help us, with our problem.Thanks very much ! your post help us, with our problem.Thanks very much ! your post help us, with our problem.Thanks very much ! your post help us, with our problem.
LikeLike
Thanks very much ! your post help us, with our problem.
Thanks very much ! your post help us, with our problem.
Thanks very much ! your post help us, with our problem.Thanks very much ! your post help us, with our problem.Thanks very much ! your post help us, with our problem.Thanks very much ! your post help us, with our problem.Thanks very much ! your post help us, with our problem.Thanks very much ! your post help us, with our problem.
Posted By: SITESH KRISHNA on Sep 26, 2008
LikeLike
DUDE! YOU GOT IT!!!
THANKS YOU ARE A GENIUS!!!
LikeLike
Thanks for the valuable help.
LikeLike
Thanx for your valuable post buddy. its the medicine for my headache as well. đ
LikeLike
Hey thanks!.. That was an awesome tip!.. Cheers for that!
LikeLike
hehehehe..
thank you Doug for this great tips..
LikeLike
Merci Doug pour avoir partag ta solution!!!
LikeLike
Thank you, now it is ok
LikeLike