Solved

Opening a Connection to SQL Server via a VPN Connection

Posted on 2015-01-01
4
163 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 10

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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.

734 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