Wednesday, March 21, 2012

Remote SQL server access

I'm writing a piece of software that is designed to access data from SQL server. The office's server has SQL server version 7 installed. The software works perfectly when running on a computer on the network in the office. I however am trying to work out how to use use the software from my home computer and connect to the SQL server database remotely. I've never done this before and I'm finding it hard to find the right information.

Firstly, is it easy to do this? What do I need to do with the server in the office to allow this to work? Do I need any extra hardware/software? How will my software connect to SQL server? Is it as simple as changing the connection string to something like the server's ip address and sql server name?

I'm writing the software in Visual Studio 2005 professional and programming in VB.

Many thanks.


Well, that depends.

"Firstly, is it easy to do this? "

Yes, this is not that hard. If you going through VPN or direct call connections using a dialin you don′t have to worry. Using the internet as the transport layer, you will have to consider your security archtitecture of your office as if you need to have access to your office you probably will need to open certain ports on the firewall which might protect your company from intruders.


"What do I need to do with the server in the office to allow this to work?"

Well assuming for the next questions that you will use a internet connection to connect to your office, you will need to have a (stateful) firewall configured in your office, which exposes the SQL Server Service to the outsides in some way. For security reasons you should consider locking you access to the office using certain security rules like IPSEC / Certificate bases transports etc.

"Do I need any extra hardware/software? "

That depends. using a firewall and the appropiate security mechanims, you won′t need additional stuff. Having a firewall which is able to do VPN, you will need to have a software which is able to establish a VPN tunnel. For the pure access to SQL Server you won′t need any additional software.


"How will my software connect to SQL server? Is it as simple as changing the connection string to something like the server's ip address and sql server name?"

Yes, thats right, after having a connection to your company network (either through the internet as described below or dial-ins) you can connect to your server easily by changing the servername within the connectionstring to the public name or the IPAdress (and eventually in addition the configured port)


Jens K. Suessmeyer


http://www.sqlserver2005.de|||

Thank you very much for your assistance. I will try this out in the office in the next couple of days. I'll post another message if I still have questions but hopefully it'll be fine.

Many thanks again,

Sam

No comments:

Post a Comment