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

Andy posted 3 months ago in Creating a connection

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 posted 3 months ago

Can you connect through SQL Server Management Studio?

How's the exact error message?

Andy posted 3 months ago

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 posted 3 months ago

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

Again, how's the exact error message?

Andy posted 3 months ago

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 posted 3 months ago

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.

Andy posted 3 months ago

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 posted 3 months ago

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?

endriu posted 3 months ago

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.

Andy posted 3 months ago

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
Andy posted 3 months ago

Below is the screen shot from cliconfg's settings:

1 attachment(s):
  • CLICONFG-Screen-Shot
Andy posted 3 months ago

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
Andy posted 2 months ago

Bump.

tomandreson5 posted 2 months ago

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

Andy posted 2 months ago

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.