How to remotely log on to the SQL Server 2014 Database: sql2014
Log on to the SQLServer (2014) database remotely for your reference. The details are as follows:
Two computers with the same IP address and CIDR Block in the same LAN
Configuration:
Computer1: Windows 10, Install SQL Server 2014 enterprise Edition (as a Server)
Computer2: Windows 10, VS2015
Computer1: (1) set two login Methods: Windows user authentication and SQL Server Authentication
(2) configure the SQL Server Configuration Manager
Set the network configuration to enable both the Named Pipes and TCP/IP protocols. The default TCP/IP Port Number is 1433.
The preceding two protocols are opened on the same client.
(3) server configurations above 05 (in version 05, the peripheral Configurator is enabled, and the Database Engine opens the remote connection in the service and connection configurator)
In SSMS, right-click the server user name and choose "server configuration"> "RemoteAccessEnabled" to "true ".
(4) re-enable the corresponding server and client services (set to automatic). The service will not be disabled when it is restarted.
(5) open port 1433 firewall-Advanced Settings-Inbound rules-New rules-Port-TCP-specific port (1433), and the remaining default listening port doscommand: netstat-
CumputerB: C # write A program to connect to the database of Computer a SQL Server
(1) Create an SQL project. Select SQL Server 2014 as the property project setting platform.
Debug-edit and set connection properties to connect successfully
(2) establish a C # console program and write code connection
// Add the namespace using System. data. sqlClient; // Connection database string cnnStr = "Server = DESKTOP-UE87L88; database = WorkshopData1; uid = sa; pwd = neopen"; // Server name, database name, user name, password myConnection = new SqlConnection (cnnStr); myConnection. open ();
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.