database connection

S

SOC

I am familiar with connecting asp pages to sql server when both servers are
on a LAN.

Can anyone advise on how to connect when the servers are remote from each
other?

Thanks Soc.
 
P

Patrick

Well, you CAN do that but the question is why would you want to? You can
specify any server in your ODBC connection string, it doesn't have to be a
server on your local network.

So if the connection string on your private LAN looks something like this:
"Driver={SQL
Server};Server=10.1.1.10;Database=SOMEDB;UID=dbuser;pwd=dbpassword"

then connecting to a remote server with a public IP of 140.192.1.10 would
look like this:
"Driver={SQL
Server};Server=140.192.1.10;Database=SOMEDB;UID=dbuser;pwd=dbpassword"

Doing this would require that port 1433 be accessible remotely, which
presents its own set of security concerns. But the worst part is the
latency. Even if your remote location can upload at a full T1 speed of
1.5mbps... even a DS3 at 44mbps, that's woefully short of the 100mbps or
1gbps speeds of a typical LAN.
 
S

SOC

Thanks Patrick. This is very helpful.
Soc
Patrick said:
Well, you CAN do that but the question is why would you want to? You can
specify any server in your ODBC connection string, it doesn't have to be a
server on your local network.

So if the connection string on your private LAN looks something like this:
"Driver={SQL
Server};Server=10.1.1.10;Database=SOMEDB;UID=dbuser;pwd=dbpassword"

then connecting to a remote server with a public IP of 140.192.1.10 would
look like this:
"Driver={SQL
Server};Server=140.192.1.10;Database=SOMEDB;UID=dbuser;pwd=dbpassword"

Doing this would require that port 1433 be accessible remotely, which
presents its own set of security concerns. But the worst part is the
latency. Even if your remote location can upload at a full T1 speed of
1.5mbps... even a DS3 at 44mbps, that's woefully short of the 100mbps or
1gbps speeds of a typical LAN.
 
M

Mike Brind

Patrick said:
Well, you CAN do that but the question is why would you want to?

Needing to connect to a remote instance is not an uncommon requirement.
You can specify any server in your ODBC connection string

You would be better advised to use OLEDB for SQL Server. ODBC just adds an
additional layer of software:

Provider=sqloledb;Data Source=140.192.1.10,1433;Network
Library=DBMSSOCN;Initial Catalog=someDB;User ID=Username;Password=Password;
 
S

SOC

Thanks Mike.
Mike Brind said:
Needing to connect to a remote instance is not an uncommon requirement.


You would be better advised to use OLEDB for SQL Server. ODBC just adds an
additional layer of software:

Provider=sqloledb;Data Source=140.192.1.10,1433;Network
Library=DBMSSOCN;Initial Catalog=someDB;User ID=Username;Password=Password;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,123
Messages
2,570,741
Members
47,296
Latest member
EarnestSme

Latest Threads

Top