I know how to connect to SQL server Management studio locally, the one to your desktop, Windows Authentication. Code is as below.
myconnection As New SqlConnection("data source =serverNAME01; initial catalog=ZPCD; integrated security=true")
But how do I connect to SQL server Management Studio on Windows Server 2012R2, SQL Server Authentication from my desktop ?
The computer and username for remote desktop connection to Windows Server 2012R2 are:
computerNAME01,
userNAME01
The server name, login, password and IP address to management studio (database engine) are:
Server name: serverName01
Login: sa
Password: Password01
IP: 192.167.1.21
and database name is ZPCD
This is an example of my code, but it doesn't work.
connetionString="Data Source=192.167.1.21,1433;
Network Library=DBMSSOCN; Initial Catalog=ZPCD;
User ID=sa;Password=Password01"
Error Message:
A network - related or instance-specific error occurred while establishing a connection to SQL server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provide: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 5)