简体   繁体   中英

Remotely connect to SQL Server database

I am using Visual Studio 2013 to develop a Windows form that binds data from a SQL Server database. I want this form to connect to a SQL Server database that is on my server. To try to connect to the server, I do the following:

SQL Server Object Explorer -> Add Server -> Browse for more -> Network Servers

It does not appear in it. Even if I just type the name of the server on the server name I get error 87.

My local machine is using Windows 8, and my server is Windows Server 2012 R2 with SQL Server 2014 Express Edition with Advance Services.

Please, help me with the connection.

Edit:

On the server end I did the following

SQL Server Configuration Manager
 -> SQL Server Network Configuration
   -> tcp/ip-> enable -> IPALL -> TCP PORT -> 1433

windows firewall advanced settings
   -> inbound -> add new rule -> port -> 1433 
      -> allow connections

Can you connect to the server using Management Studio? If not, check in the SQL Server Configuration Manager you have enabled TCP connection for express edition of SQL server and you have enabled remote connection (TCP port 1433) in windows firewall.

在此处输入图片说明

enable the IP that you want to connect for example i'm using local host you can use your PC IP :192.168.1.2
or you can use public IP if you have public IP

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM