Solved

Opening a Connection to SQL Server via a VPN Connection

Posted on 2015-01-01
4
170 Views
Last Modified: 2015-01-07
I'm trying to open a connection to a SQL Server instance via a VPN connection. The connection string I have is not working:

Provider=SQLNCLI11;Data Source=MySQLServer;Initial Catalog=MyDatabase;User Id=MyUSerID;Password=MyPassword;

I get this error:

Named Pipes Provider: Could not open a connection to SQL Server [53].

I also tried this connection string:

Provider=SQLNCLI11;Data Source=MySQLServer;Initial Catalog=MyDatabase;Integrated Security=SSPI

With what I think are my Windows credentials added to the list of security logins in SQL Server. To create the login, I used the VPN login credentials. I can't figure out how to add my workstation's Windows credentials - the workstation being the workstation on which I am running the VPN client.

What am I missing?

Kevin
0
Comment
Question by:zorvek (Kevin Jones)
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 167 total points
ID: 40527223
MySQLServer is Not MSSQL.  Two completely different products.

Windows credentials only work if the SQL Server is on the same machine or you are on Active Directory where the remote SQL Server can verify them.  Otherwise, you need to enable Remote connections on the SQL server and use SQL Authentication, username and password.

You can find connection strings for different situations here: http://www.connectionstrings.com/sql-server/
0
 
LVL 11

Assisted Solution

by:HuaMinChen
HuaMinChen earned 167 total points
ID: 40527262
Please ensure your connection string is something like
	<connectionStrings>
		<add name="conn2" connectionString="Data Source=192.?.?.?\your_db_instance;Initial Catalog=your_db_schema;Integrated Security=False;User ID=your_db_login;Password=??????" providerName="System.Data.SqlClient"/>
	</connectionStrings>

Open in new window


within Web.config/app.config file in your project, to ensure the project will work fine with the database.
0
 
LVL 70

Assisted Solution

by:Qlemo
Qlemo earned 166 total points
ID: 40527325
Named Pipes can get very problematic, in particular with non-domain clients. Make sure TCP/IP is enabled on MSSQL server and client. Disable Named Pipes on the client.
In regard of the authentication: You'll have to use explicit authentication, providing username and password, if not I the same domain.
0
 
LVL 81

Author Comment

by:zorvek (Kevin Jones)
ID: 40535936
This has turned out to be a network security issue so I'll close this question without identifying any specific response as a solution.

Kevin
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question