Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VPN Connection to SQL Server

Status
Not open for further replies.

faccorp

Programmer
Jan 24, 2002
58
US
Hello,

I have a Win2K3 server with SQL2005 Express installed. The server also allows VPN connections.

From a remote computer, I can VPN without problem to the server. However, I get mixed results when trying to connect to the SQL Server. Usually it doesn't connect at all. If I play with forcing TCP/IP or Named pipes and/or connect using Windows Authentication or SQL Authentication, I can usually get a connection. This is after trying a variety of different connection types. I can't make it consistently repeat the failure or success of the connection, so I am puzzled what the correct method should be.

Once connected, the connection is very very slow. So slow that it's not even worth doing. I am using DSL on both ends.

A while back, before I had enabled VPN, I temporarily exposed the server IP address to the internet so that I could ping the IP address from a remote location. In doing this, I was able to connect to SQL server with decent speed and performance.

I don't think that its a VPN problem though because I can copy files to and from the server relatively quickly.

The slow SQL performance and erractic connection is exhibited using the client front end (which uses OLEDB) as well as simply connecting using SQL Management Studio.


From within the main office, on a LAN, all connections to SQL server work just fine with good speed and performance.

So - all that said, is there a performed method of connecting to SQL server via VPN? Are there any specific ports I need to enable in the firewall? (I've twiddled with this but it doesn't seem to help or hurt it).


Thanks
 
The SQL default port is 1433, but you can verify this by checking the Server Properties, Network Config properties and then check the properties of the TCP/IP configuration.

Personally, I don't recommend using 1433 because of all the viruses (Slammer) and D.O.S. attacks aimed at that port. If you want to change it, you can change it there, then make sure your firewall has an opening that the VPN can use.

BTW, if you don't have the SQL Server port open in the firewall, I don't know how you're managing to connect at all.

Are you actually remoting in directly to the server or are you using SQL Server client tools on your remote PC to connect to SQL Server?



Catadmin - MCDBA, MCSA
"No, no. Yes. No, I tried that. Yes, both ways. No, I don't know. No again. Are there any more questions?"
-- Xena, "Been There, Done That"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top