question

R3541-6953 avatar image
0 Votes"
R3541-6953 asked ErlandSommarskog commented

Can't connect to SQL Server from other computers

I want to ask you about a problem.

I have developed a windows application that uses a SQL Server database with SQL Server authentication (with a username and password) to log in.

The database is located on a local server which uses the same network as my company computers.

Now I have published the application and installed it on my computer (where I developed it and in which I also have the SQL server installed).

I also installed the application on the computers of some colleagues who do not have any program installed (they do not have Visual Studio or SQL Server installed).

When I try to log in to the application from my computer everything works fine. (I can enter in application and database communication works very well).

But when I try to log in to the application from other computers (with the same user which I used on my computer before), it does not work.

I get this error:

Named pipes provider error 40 could not open a connection to SQL Server

I did these steps on the server where the application is located as:

1.Enable TCP / IP in SQL Server Configuration
2.Open Port in Windows Firewall 1433
3. Allow remote connections to this server
Can you help me with any suggestions?

sql-server-generalwindows-server
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DirkHondong avatar image
0 Votes"
DirkHondong answered

Quick idea:
restarted SQL server service after enabling tcp/ip?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

romeodonca avatar image
0 Votes"
romeodonca answered

Hi
other computers are in the same VLAN?
If not, check existing ACLs based on IP and/or TCP port ( contact your net admins )
If all computers are in same vlan, disable firewall on the computer - check then. If it's working , the rule on firewall is not applied correct. Check again the rule , enable firewall and try again. Check on server side if the instance is configured to use a static TCP port
best regards
romeo

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Criszhan-msft avatar image
0 Votes"
Criszhan-msft answered ErlandSommarskog commented

Hi @R3541-6953,

If currently cannot connect to the remote SQL Server database from your application on local, please try to use SSMS to test the connection.
And please refer to following doc to Troubleshoot connecting to the SQL Server Database Engine.
https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/troubleshoot-connecting-to-the-sql-server-database-engine?view=sql-server-ver15

hope this helps.
Best Regards,


If the answer is helpful, please click "Accept Answer" and upvote it.
What can I do if my transaction log is full?--- Hot issues November
How to convert Profiler trace into a SQL Server table -- Hot issues November


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I tried to test with ODBC and it is Working super. I see this message "Test successfully". But from Application didn't work. I don't now why?

0 Votes 0 ·

So what does your connection string looks like?

1 Vote 1 ·