The amazing adventures of Doug Hughes

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)

  1. [URL=http://kjixrtth.com]ueopexzs[/URL] gscovjkb http://yytahqnp.com cizwsugm tuzfltxi fskxkauq

    Like

  2. [URL=http://wfyrumvi.com]hrdglloi[/URL] nhitowxx http://mzsibdlq.com mhbkdbef bmvrvvjh sprukpvf

    Like

  3. [URL=http://ssbabtjt.com]lgkrkdpz[/URL] yvgvbzty http://rfobezpz.com cftvhlac edulhcbv zmvblppr

    Like

  4. Hi Doug, thanks a lot for sharing! This helped us resolve our problems too! More power and share more! ๐Ÿ˜€

    ~Mavi0725

    Like

  5. Hi Doug, thanks a lot for sharing! This helped us resolve our problems too! More power and share more! ๐Ÿ˜€

    ~Mavi0725

    Like

  6. Hi Doug, thanks a lot for sharing! This helped us resolve our problems too! More power and share more! ๐Ÿ˜€

    ~Mavi0725

    Like

  7. Hi Doug, thanks a lot for sharing! This helped us resolve our problems too! More power and share more! ๐Ÿ˜€

    ~Mavi0725

    Like

  8. Hi Doug, thanks a lot for sharing! This helped us resolve our problems too! More power and share more! ๐Ÿ˜€

    ~Mavi0725

    Like

  9. Thanks a lot….. this fixes my problem.

    Cool
    ๐Ÿ™‚

    Like

  10. 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

    Like

  11. praveen Varu said:

    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()

    Like

  12. ivansteven said:

    Thanks a lot….. Now I can connect to the SQL Server.

    Like

  13. Thanks it is very helpful advice from u

    Like

  14. 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!

    Like

  15. Thanks.it works

    Like

  16. Thanks buddy,it did the trick ๐Ÿ˜‰

    Like

  17. Thanks very much ! your post help us, with our problem.

    Regards

    Like

  18. SITESH KRISHNA said:

    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.

    Like

  19. 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

    Like

  20. DUDE! YOU GOT IT!!! said:

    DUDE! YOU GOT IT!!!

    THANKS YOU ARE A GENIUS!!!

    Like

  21. vinit kumar said:

    Thanks for the valuable help.

    Like

  22. Thanx for your valuable post buddy. its the medicine for my headache as well. ๐Ÿ˜€

    Like

  23. Hey thanks!.. That was an awesome tip!.. Cheers for that!

    Like

  24. hehehehe..
    thank you Doug for this great tips..

    Like

  25. Merci Doug pour avoir partag ta solution!!!

    Like

  26. Thank you, now it is ok

    Like

Comments are closed.

Tag Cloud

%d bloggers like this: