Connect to SQL Server over internet

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Senad
Posts: 34
Joined: Tue 10 Dec 2013 08:07

Connect to SQL Server over internet

Post by Senad » Mon 28 Nov 2016 01:45

I am using uniconnection dialog to connect to sqlserver.
TCP protocol is enabled on the server.
Named pipes too ...
I have disabled the firewall.
I have a static IP.
On my router I have enabled port forwarding to my PC-NAME to port 1433.
In UniConnection dialog (when shown) I have setup username and password + database name.
Server : 193.95.220.94 (example...this is static IP)
Port : 1433
However, I get the error: Named Pipes Provider.Could not open connection to sql server (54)
What am I doing wrong ?

ertank
Posts: 172
Joined: Wed 13 Jan 2016 16:00

Re: Connect to SQL Server over internet

Post by ertank » Mon 28 Nov 2016 12:40

Hi,

I never setup a router to forward to a computer name. I always do it using IP numbers. You may try setting your router this way.

It would be good to check that your local computer running SQL Server is has manual set IP address and not DHCP.

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: Connect to SQL Server over internet

Post by azyk » Tue 29 Nov 2016 11:53

This error message can occur when a client application is trying to connect to SQL Server via TCP/IP protocol, but this protocol is disabled on the server. To solve the issue try to turn to the following SQL Server documentation article: https://technet.microsoft.com/en-us/lib ... .110).aspx

Senad
Posts: 34
Joined: Tue 10 Dec 2013 08:07

Re: Connect to SQL Server over internet

Post by Senad » Sat 10 Dec 2016 16:05

Protocols are all enabled ...

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: Connect to SQL Server over internet

Post by azyk » Wed 14 Dec 2016 09:43

Please run SQL Server Management Studio on the client's machine, select File->New->Database Engine Query, in the opened dialogue in the Server name field input IP address SQL Server, select Autentification - SQL Server Autentification, fill the user login and password. Then click the Options button and on the Connection Properties tab in the Network protocol combo select the Named Pipes value, click Connect and inform us about the results.

Post Reply