0

I have created a sql server database on my vps server. I would like to connect from my personal computer with that database with SQL server Management studio or c# application. Unfortunately it seems that my database works only in local area.

I already added new SQL user to be able to connect. The thing is that I can connect with database on my vps server, but I can't do this on my personal pc:

[1]

Is it even possible to do?

2
  • Is there a firewall between your VPS and your PC? If so, you probably need to set a static port for SQL Server and open that port in the firewall. Oct 11, 2016 at 19:25
  • I have firewall disabled: puu.sh/rFRwc/5cf01e5e20.png (its polish language, but as you can see every shield is red colored). I can ping vps ip from cmd and I recive packets. ICMP protocol is unblocked aswell.
    – Damian
    Oct 11, 2016 at 23:45

3 Answers 3

0

In the server properties you must enable remote connections in the the connections tab!

Highlight your database in object explorer and right click.

Go to properties and the connection tab.

Check the enable remote connections box!

Hope this helps

1
  • I already have that checkbox checked.
    – Damian
    Oct 11, 2016 at 23:31
0

You also need to make sure that SQL Server is allowed to use TCP/IP or named pipes. You can turn these on by opening the SQL Server Configuration Manager in Start > Programs > Microsoft SQL Server 2012 > Configuration Tools, and make sure that TCP/IP and Named Pipes are enabled. Try connecting then, if not, Then go into "SQL Server Network Configuration" and double click TCP/IP. Click the "IP Addresses" tab and scroll to the bottom. Under "IP All" remove TCP Dynamic Ports if it is present and set TCP Port to 1433. Click OK and then go to "SQL Server Services" and restart SQL Server instance and try to connect.

3
  • None of your suggestions helped :/ puu.sh/rGrrl/a6fd447904.png puu.sh/rGrsn/eb89e0c891.png puu.sh/rGrsU/879c3b2583.png I also tried to enable TCP/IP and Named Pipes in Network Configurations but that doesnt help either.
    – Damian
    Oct 12, 2016 at 13:40
  • Your screenshot showed those protocols (TCPIP and Named Pipes) as "disabled". Can you try "enabling" them and re-test?
    – rvsc48
    Oct 12, 2016 at 14:32
  • I said that "also tried to enable TCP/IP and Named Pipes in Network Configurations but that doesnt help either. "
    – Damian
    Oct 12, 2016 at 16:11
0

Additionally to what others said to you i suggest to check the TCP/IP communication between physical and VPC (and the ip address resolution). Than check if Sql Server Browser service is running.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .