SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 SQL Server does not exist or access denied.
 New Topic  Reply to Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

astralis
Yak Posting Veteran

USA
59 Posts

Posted - 07/29/2013 :  18:45:12  Show Profile  Reply with Quote
The SQL Server is on one machine while I serve the pages from another machine.

I've been doing this for years and have never had this issue.

Sometimes when I'm low on memory for SQL Server I will obtain this error message but currently I have plenty of memory.
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
37167 Posts

Posted - 07/29/2013 :  18:45:39  Show Profile  Visit tkizer's Homepage  Reply with Quote
It's actually not at all a SQL Server issue, but you probably just worded it wrong. You probably meant Windows. You aren't reaching the SQL Server at all. If you were to run a SQL Server trace via SQL Profiler, you wouldn't even see a connection attempt. The issue is definitely somewhere on the app/web server since port works from UDL and through SSMS.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

astralis
Yak Posting Veteran

USA
59 Posts

Posted - 07/29/2013 :  19:23:35  Show Profile  Reply with Quote
Understood. What would typically stop it from making a connection?

The firewall seems to have everything open as normal -- no changes that I can see.

TCP/IP is enabled.
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
37167 Posts

Posted - 07/29/2013 :  19:34:07  Show Profile  Visit tkizer's Homepage  Reply with Quote
Well the typical things are firewall and problem figuring out the port from the instance name. You don't have a firewall issue since udl and SSMS are working on that same box. You are specifying the port, so it's not an instance issue where a SQL alias would help. And the port was validated via udl and SSMS.

Since you can SSMS and udl both work locally, it means firewall/ports/everything is okay.

Have you tried reinstalling the .NET framework? It's ASP.NET, right?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
37167 Posts

Posted - 07/29/2013 :  19:34:55  Show Profile  Visit tkizer's Homepage  Reply with Quote
In your error message, it says DBNETLIB. That's named pipes. When I said to try adding tcp: to the connection string, did it specify a different library? Could you double check that? It should no longer say DBNETLIB.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

astralis
Yak Posting Veteran

USA
59 Posts

Posted - 07/29/2013 :  19:45:23  Show Profile  Reply with Quote
It's the same error: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

Go to Top of Page

tkizer
Almighty SQL Goddess

USA
37167 Posts

Posted - 07/29/2013 :  19:51:00  Show Profile  Visit tkizer's Homepage  Reply with Quote
Hmmm, that means it's not using TCP. It should have switched to DBMSSOCN.

Okay, so I think you should try adding a SQL alias.

Here's my blog article for the error you are getting: http://weblogs.sqlteam.com/tarad/archive/2008/05/23/60609.aspx

I show how to add it in the links I provided.

Basically, you'll be adding a new string value here:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo

You may need to create the ConnectTo key.

String value name: ServerName or any alias you want really
Data value: DBMSSOCN,IpAddressGoesHere,PortNumberGoesHere

Then you would change your connection string to use only the name of the SQL alias (string value name).

By the way, is this server 64-bit or 32-bit? You may need to add the SQL alias to the wow section if it's 64-bit and the app is 32-bit.

Also, you should consider not using the IP address. I never, ever specify IP addresses. If an IP address is required, then the DNS admin needs to fix it. You should never need to specify it when connecting to SQL Server.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
37167 Posts

Posted - 07/29/2013 :  19:52:22  Show Profile  Visit tkizer's Homepage  Reply with Quote
To be clear, you'll be changing this:
Data Source=REDACTED IP,PORT

To this:
Data Source=SqlAliasName <--whatever the string value's name is, do not specify port here. The SQL alias will handle the port.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

astralis
Yak Posting Veteran

USA
59 Posts

Posted - 07/29/2013 :  23:16:03  Show Profile  Reply with Quote
I've looked through those links and I think I'm missing how to create a SQL Alias.

UPDATE: To clarify, there are two servers.One holds the database, the other holds the web server (IIS).

I figured I better test the connections by telnetting from the web server box to the SQL Server box. It failed immediately but does not fail on any other machine not connected to the network.

The network administrators are looking into this. I'll post their response because this is still just a hypothesis.

Edited by - astralis on 07/30/2013 00:06:16
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
37167 Posts

Posted - 07/30/2013 :  00:28:37  Show Profile  Visit tkizer's Homepage  Reply with Quote
The SQL alias would go on the web server. My post above should have enough info to create it.

If a telnet test isn't working, then I don't understand how SSMS or UDL would work on the web server. Could you specify what telnet test you did? Was it this: telnet IpAddress PortNumber (no comma or other punctuation except what's needed for the IP, all just spaces)

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

astralis
Yak Posting Veteran

USA
59 Posts

Posted - 07/30/2013 :  01:15:28  Show Profile  Reply with Quote
It's not certain yet, but the network admins think there's some sort of connection problem between the two servers.

>> Was it this: telnet IpAddress PortNumber

Yes. When I telnet from the IIS box to the SQL Server box, I receive an immediate failed error.

But when I try from the SQL Server box or from my remote location, I receive non-readable data -- which points to why SSMS works.

This is still all speculation, though.
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
37167 Posts

Posted - 07/30/2013 :  12:55:00  Show Profile  Visit tkizer's Homepage  Reply with Quote
But I thought you had done UDL and SSMS tests on the web server? Isn't that what you meant by "local"? I guess by local you meant something else. I thought you meant local to where the problem is.

If a telnet test doesn't work, then yeah you'll get that error.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
37167 Posts

Posted - 08/09/2013 :  13:58:49  Show Profile  Visit tkizer's Homepage  Reply with Quote
Were you able to get this working?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000