Wide Area connection to SQL server 2008 Express via broadband

  • Follow


I have a Vb6 application that connects to SQL server 2008 Express (installed 
on a Windows XP box connected to a router); currently the application 
connects to the server and remains connected until the user closes the 
application (the application disconnects from the server on close). This has 
been working great for a long time within the local area network.

Now, the user of the application opened another office in another state and 
would like to install the application on local machines but have the 
machines in the new office connect to the database in the (head) office 
where the application is currently running and running fine. Off of the top 
of my head I told the user he would need static IP. But then I am wondering 
if there are issues with connecting via internet and having the connection 
open until the user disconnects. Again the application is VB6 (SP6) using 
ADO connection.

Thanks in advance for your help 


0
Reply jpBless 12/6/2009 8:36:48 PM

"jpBless" <jp3blessNoSpam@hotmail.com> wrote:

>Now, the user of the application opened another office in another state and 
>would like to install the application on local machines but have the 
>machines in the new office connect to the database in the (head) office 
>where the application is currently running and running fine. Off of the top 
>of my head I told the user he would need static IP. 

Why and where?  If at the remote office no.  If at the head office
then maybe.  Or if his router can announce the IP address to a dynamic
IP system on the cloud somewhere that'd work.

>But then I am wondering 
>if there are issues with connecting via internet and having the connection 
>open until the user disconnects. Again the application is VB6 (SP6) using 
>ADO connection.

I've only tested it a bit but I was quite happy with getting to in my
clients SQL Server data via VPN from my home.  Now this was in Access
and not VB6 but a continuous form with 4,000 records took only a few
seconds to display.

I'd suggest testing out the error handling by setting up a test server
on another system and unplugging the network cable.

Also if you really want to test low bandwidth there's a Linux distro
of some sort that boots from a floppy on an old PC with two network
cards.   You can throttled the speed of the connection down to
whatever you want.

Tony
-- 
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files 
  updated see http://www.autofeupdater.com/
Granite Fleet Manager http://www.granitefleet.com/
0
Reply Tony 12/6/2009 8:49:58 PM



First off thanks for responding... and good question. Sorry I neglected to 
explain this part. I told the app user he would need static IP at the head 
office; that other computers outside head office )current LAN) would need to 
use the static IP to connect to the head office. My reasoning is dynamic IP 
changes now and then... when the router is powered down and up

>>Now, the user of the application opened another office in another state 
>>and
>>would like to install the application on local machines but have the
>>machines in the new office connect to the database in the (head) office
>>where the application is currently running and running fine. Off of the 
>>top
>>of my head I told the user he would need static IP.
>
> Why and where?  If at the remote office no.  If at the head office
> then maybe.  Or if his router can announce the IP address to a dynamic
> IP system on the cloud somewhere that'd work.
>




"Tony Toews [MVP]" <ttoews@telusplanet.net> wrote in message 
news:406oh5hvppvlumigd3h2tccktshdn0fl1f@4ax.com...
> "jpBless" <jp3blessNoSpam@hotmail.com> wrote:
>
>>But then I am wondering
>>if there are issues with connecting via internet and having the connection
>>open until the user disconnects. Again the application is VB6 (SP6) using
>>ADO connection.
>
> I've only tested it a bit but I was quite happy with getting to in my
> clients SQL Server data via VPN from my home.  Now this was in Access
> and not VB6 but a continuous form with 4,000 records took only a few
> seconds to display.
>
> I'd suggest testing out the error handling by setting up a test server
> on another system and unplugging the network cable.
>
> Also if you really want to test low bandwidth there's a Linux distro
> of some sort that boots from a floppy on an old PC with two network
> cards.   You can throttled the speed of the connection down to
> whatever you want.
>
> Tony
> -- 
> Tony Toews, Microsoft Access MVP
> Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
> Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
> For a convenient utility to keep your users FEs and other files
>  updated see http://www.autofeupdater.com/
> Granite Fleet Manager http://www.granitefleet.com/ 


0
Reply jpBless 12/6/2009 9:02:39 PM

jpBless wrote:
> I have a Vb6 application that connects to SQL server 2008 Express (installed
> on a Windows XP box connected to a router); currently the application
> connects to the server and remains connected until the user closes the
> application (the application disconnects from the server on close). This has
> been working great for a long time within the local area network.
>
> Now, the user of the application opened another office in another state and
> would like to install the application on local machines but have the
> machines in the new office connect to the database in the (head) office
> where the application is currently running and running fine. Off of the top
> of my head I told the user he would need static IP. But then I am wondering
> if there are issues with connecting via internet and having the connection
> open until the user disconnects. Again the application is VB6 (SP6) using
> ADO connection.
>
> Thanks in advance for your help

There are "issues" with any database connection - especially if it's not 
reliable. As you can't assume it is reliable, you have to make 
allowances (ie, proper error handling).

Tony has already mentioned the idea of using a VPN between offices, as 
very few wish to leave their SQL Server (port 1433) open to attack from 
anyone on the internet.

If you were willing to use disconnected recordsets (or XML), then you 
could create some "middleware", hosted by IIS, to which you could 
connect. It would in turn communicate with the database. Ignoring CGI 
and RDS, there is still:

SOAP
http://www.microsoft.com/downloads/details.aspx?displaylang=en&familyid=ba611554-5943-444c-b53c-c0a450b7013c

RPC
http://www.enappsys.com/backend/vbXMLRPC_Index.jsp

XMLHTTP
http://www.15seconds.com/issue/021029.htm
http://www.4guysfromrolla.com/webtech/110100-1.shtml

I use XMLHTTP.

HTH
0
Reply Jason 12/7/2009 2:53:22 PM

"jpBless" <jp3blessNoSpam@hotmail.com> wrote:

>First off thanks for responding... and good question. Sorry I neglected to 
>explain this part. I told the app user he would need static IP at the head 
>office; that other computers outside head office )current LAN) would need to 
>use the static IP to connect to the head office. My reasoning is dynamic IP 
>changes now and then... when the router is powered down and up

Fixed IP addresses change too sometimes.  <sigh>  We're on our third
in five years for my fixed IP webserver.   

You could use a router which updates a dynamic DNS server somewhere,
such as my Linksys which can update sometime like tonytoews.dyndns.org
or similar.

Or you can run some client software on a PC inside your firewall that
updates your DNS with the IP address.   I used to use
http://www.directupdate.net/ to access a tower system at home when I
was on the road a lot.  Worked very well and many options as to which
DNS system to update.

Tony
-- 
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files 
  updated see http://www.autofeupdater.com/
Granite Fleet Manager http://www.granitefleet.com/
0
Reply Tony 12/8/2009 2:03:01 AM

"Tony Toews [MVP]" <ttoews@telusplanet.net> wrote in message 
news:omcrh5h124k41983evlmo8tiiol1nv90sg@4ax.com...
> "jpBless" <jp3blessNoSpam@hotmail.com> wrote:
>
>>First off thanks for responding... and good question. Sorry I neglected to
>>explain this part. I told the app user he would need static IP at the head
>>office; that other computers outside head office )current LAN) would need 
>>to
>>use the static IP to connect to the head office. My reasoning is dynamic 
>>IP
>>changes now and then... when the router is powered down and up
>
> Fixed IP addresses change too sometimes.  <sigh>  We're on our third
> in five years for my fixed IP webserver.

The meaning of "fixed ip" has become blurred somewhat, literally it means 
"not assigned by DHCP".  To an ISP, selling you a fixed IP simply means they 
have administratively assigned a specific IP address for your exclusive use. 
It doesn't really imply any permanance, ISPs must be free to change such 
assignments.

The blur is introduced by such things as DHCP reservations that assign 
specific IPs to specific MAC addresses.  The result is a "dynamically" 
assigned IP that is always the same, until the reservation is changed. 
(Somewhat common in DOCSIS cable systems.)

As for the OP's question, dynamic DNS is the near equivilent of a fixed IP; 
probably a better long-range plan to use a DNS-supported host name instead 
of an IP address, because lots of things can force an IP to change.  But 
regardless, the impact of this aspect is limited to the connection string.

More significant is the impact of connecting directly to SQL Server over the 
public Internet.  The security aspect of exposing a SQL Server to the public 
(as noted elsewhere in this thread) is non-trivial -- even if your server is 
never compromised, it will likely be stuck with the overhead of fending-off 
attacks.  One production server I work with sees 4M-6M bogus logon attempts 
per year, from IPs in Asia -- whoever the scandalous bastards are, the never 
seem to tire of it.  (Needless to say, we enforce extremely strong passwords 
on this box.)  A VPN is highly recommended if at all practical.

The quality of the connection could be an issue as well, your code should 
have more robust connection management built into it than merely connecting 
once and assuming it will remain valid for the session.  You can recover 
from a lost connection easily enough if you detect it in time, but if you 
try to use a recordset with an  ActiveConnection that's failed somehow that 
recordset will be forced closed immediately.  Best to leave recordsets 
disconnected until a connection is needed, and to test the connection before 
the recordset uses it.  I like cn.Execute("SELECT 0"), if no errors are 
thrown, the connection is almost certainly valid.


Good Luck,
Mark






> You could use a router which updates a dynamic DNS server somewhere,
> such as my Linksys which can update sometime like tonytoews.dyndns.org
> or similar.
>
> Or you can run some client software on a PC inside your firewall that
> updates your DNS with the IP address.   I used to use
> http://www.directupdate.net/ to access a tower system at home when I
> was on the road a lot.  Worked very well and many options as to which
> DNS system to update.
>
> Tony
> -- 
> Tony Toews, Microsoft Access MVP
> Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
> Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
> For a convenient utility to keep your users FEs and other files
>  updated see http://www.autofeupdater.com/
> Granite Fleet Manager http://www.granitefleet.com/ 


0
Reply Mark 12/14/2009 2:29:53 PM

Thanks Tony, Mark... very useful information... much appreciated


"Mark McGinty" <mmcginty@spamfromyou.com> wrote in message 
news:%23lzjmnMfKHA.5792@TK2MSFTNGP05.phx.gbl...
>
> "Tony Toews [MVP]" <ttoews@telusplanet.net> wrote in message 
> news:omcrh5h124k41983evlmo8tiiol1nv90sg@4ax.com...
>> "jpBless" <jp3blessNoSpam@hotmail.com> wrote:
>>
>>>First off thanks for responding... and good question. Sorry I neglected 
>>>to
>>>explain this part. I told the app user he would need static IP at the 
>>>head
>>>office; that other computers outside head office )current LAN) would need 
>>>to
>>>use the static IP to connect to the head office. My reasoning is dynamic 
>>>IP
>>>changes now and then... when the router is powered down and up
>>
>> Fixed IP addresses change too sometimes.  <sigh>  We're on our third
>> in five years for my fixed IP webserver.
>
> The meaning of "fixed ip" has become blurred somewhat, literally it means 
> "not assigned by DHCP".  To an ISP, selling you a fixed IP simply means 
> they have administratively assigned a specific IP address for your 
> exclusive use. It doesn't really imply any permanance, ISPs must be free 
> to change such assignments.
>
> The blur is introduced by such things as DHCP reservations that assign 
> specific IPs to specific MAC addresses.  The result is a "dynamically" 
> assigned IP that is always the same, until the reservation is changed. 
> (Somewhat common in DOCSIS cable systems.)
>
> As for the OP's question, dynamic DNS is the near equivilent of a fixed 
> IP; probably a better long-range plan to use a DNS-supported host name 
> instead of an IP address, because lots of things can force an IP to 
> change.  But regardless, the impact of this aspect is limited to the 
> connection string.
>
> More significant is the impact of connecting directly to SQL Server over 
> the public Internet.  The security aspect of exposing a SQL Server to the 
> public (as noted elsewhere in this thread) is non-trivial -- even if your 
> server is never compromised, it will likely be stuck with the overhead of 
> fending-off attacks.  One production server I work with sees 4M-6M bogus 
> logon attempts per year, from IPs in Asia -- whoever the scandalous 
> bastards are, the never seem to tire of it.  (Needless to say, we enforce 
> extremely strong passwords on this box.)  A VPN is highly recommended if 
> at all practical.
>
> The quality of the connection could be an issue as well, your code should 
> have more robust connection management built into it than merely 
> connecting once and assuming it will remain valid for the session.  You 
> can recover from a lost connection easily enough if you detect it in time, 
> but if you try to use a recordset with an  ActiveConnection that's failed 
> somehow that recordset will be forced closed immediately.  Best to leave 
> recordsets disconnected until a connection is needed, and to test the 
> connection before the recordset uses it.  I like cn.Execute("SELECT 0"), 
> if no errors are thrown, the connection is almost certainly valid.
>
>
> Good Luck,
> Mark
>
>
>
>
>
>
>> You could use a router which updates a dynamic DNS server somewhere,
>> such as my Linksys which can update sometime like tonytoews.dyndns.org
>> or similar.
>>
>> Or you can run some client software on a PC inside your firewall that
>> updates your DNS with the IP address.   I used to use
>> http://www.directupdate.net/ to access a tower system at home when I
>> was on the road a lot.  Worked very well and many options as to which
>> DNS system to update.
>>
>> Tony
>> -- 
>> Tony Toews, Microsoft Access MVP
>> Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
>> Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
>> For a convenient utility to keep your users FEs and other files
>>  updated see http://www.autofeupdater.com/
>> Granite Fleet Manager http://www.granitefleet.com/
>
> 


0
Reply jpBless 12/14/2009 6:23:48 PM

6 Replies
250 Views

(page loaded in 0.143 seconds)


Reply: