MSSQL Server - Can't connect with TCP/IP but can connect with Named Pipes

[expired user #11700]'s profile image [expired user #11700] posted 6 years ago in Creating a connection Permalink

I'm trying to connect to MSSQL Server with TCP/IP and keep getting SQL ERROR (17) - it can't find the DB or User/PW if no good. But I can connect with Named Pipes using the same User ID & PW.

I've checked the protocols in SQL Server Configuration Manager/SQL Server Network Configuration and IP4 (127.0.0.1) is enabled.

I've tried dynamic ports/no dynamic ports, setting the port to 1433/leaving it blank, and all combinations.

Currently it is set at Dynamic Ports on [0] and TCP Port [blank] (which was the default, so I put it back.)

I also have noticed that when I try to connect via TCP/IP that the Session manager hangs and Windows 10 needs to restart it. (I don't know if this is related to my problem.)

Any help would be greatly appreciated as that once this I get this test working locally I need to connect to an MSSQL server through the internet and thus need the TCP/IP connectivity.

Thank you in advance

ansgar's profile image ansgar posted 6 years ago Permalink

Can you connect through SQL Server Management Studio?

How's the exact error message?

[expired user #11700]'s profile image [expired user #11700] posted 6 years ago Permalink

Can you connect through SQL Server Management Studio?

How's the exact error message?

Yes. I also just switched the connection type from "default" to TCP/IP to check if that too would work, it does. (I don't know what the default method is, so I figured it would be best to check the TCP/IP connection.)

ansgar's profile image ansgar posted 6 years ago Permalink

I suppose you need to compare the port number and user/password then.

Again, how's the exact error message?

[expired user #11700]'s profile image [expired user #11700] posted 6 years ago Permalink

I suppose you need to compare the port number and user/password then.

Again, how's the exact error message? Port Numbers are all 1433 (Also checked in cliconfg)

User/PW is identical for both named pip & TCP/IP. (I may be slow, but I'm not that slow.)

SQL ERROR (17) - it can't find the DB or User/PW if no good. (The text is a bit longer than that but it doesn't let me C&P it.)

ansgar's profile image ansgar posted 6 years ago Permalink

Can't believe this is what the error message wants to say:

it can't find the DB or User/PW if no good

Press Ctrl/C in the error popup. Or make a screenshot if you can't copy it.

[expired user #11700]'s profile image [expired user #11700] posted 6 years ago Permalink

Can't believe this is what the error message wants to say:

it can't find the DB or User/PW if no good

Press Ctrl/C in the error popup. Or make a screenshot if you can't copy it.

The Crtl/C worked (I should remember that for other programs' error popups that I could never C&P with the mouse.) Thanx.

Here is the message:

Named Pipe Test: Error

SQL Error (17): [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied SQL Server does not exist or access denied.

ansgar's profile image ansgar posted 6 years ago Permalink

Ok, this gets confusing here. Now you get an error with a named pipe connection? Your first post says TCP/IP is not connecting, but named pipe works?

[expired user #11712]'s profile image [expired user #11712] posted 6 years ago Permalink

I'm having similar problems running in Wine.

For TCP/IP I'm getting:

SQL Error (6): [DBNETLIB][ConnectionOpen (Connect()).]Specified SQL Server not found Specified SQL Server not found.

For a named pipe I'm getting:

SQL Error (17): [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied SQL Server does not exist or access denied.

The connection settings are correct.

[expired user #11700]'s profile image [expired user #11700] posted 6 years ago Permalink

Ok, this gets confusing here. Now you get an error with a named pipe connection? Your first post says TCP/IP is not connecting, but named pipe works?

Typo on my part - not part of the C&P.

I have named the two connections "Named Pipe Test" and "TCP/IP Test" and I guess I just typed the first one in as the description without thinking.

Also, Session Manager, aka the program, sits there with the circle spinning for a while if I move the mouse pointer over the window (if I click anywhere inside the window while the circle is spinning it hangs and says "Session manager (Not Responding)" then in both cases the error message appears.

I'm going to attempt to attach a screen shot and bellow is the entire C&P (unedited to ensure no typo's this time):

[Window Title] Error

[Content] SQL Error (17): [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied SQL Server does not exist or access denied.

[OK]

[Footer] Find some help on this error

1 attachment(s):
  • Heidi-Screen-Shot
[expired user #11700]'s profile image [expired user #11700] posted 6 years ago Permalink

Below is the screen shot from cliconfg's settings:

1 attachment(s):
  • CLICONFG-Screen-Shot
[expired user #11700]'s profile image [expired user #11700] posted 6 years ago Permalink

Below is the TCP/IP Properties screen from SQL Server Configuration Manager:

I can’t expand the window to show them all - But IP1 appears to be the mac address of my nic and is Active but not Enabled and IPALL just has 62222 by "TCP Dynamic Ports" and nothing beside "TCP Port."

1 attachment(s):
  • SQL-Server-Configuration-Manager-Screen-Shot
[expired user #11700]'s profile image [expired user #11700] posted 6 years ago Permalink

Bump.

[expired user #11745]'s profile image [expired user #11745] posted 6 years ago Permalink

This is such a nice information. It really works for me.

[expired user #11700]'s profile image [expired user #11700] posted 6 years ago Permalink

This is such a nice information. It really works for me.

So what are you doing that I am not?

Please login to leave a reply, or register at first.