database connection

database connection

am 17.02.2007 21:01:52 von 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.

Re: database connection

am 18.02.2007 02:43:03 von David Kirkby

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=dbpa ssword"

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=d bpassword"

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.


"SOC" wrote in message
news:uZTde4sUHHA.4844@TK2MSFTNGP03.phx.gbl...
>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.
>
>

Re: database connection

am 18.02.2007 09:05:28 von soc

Thanks Patrick. This is very helpful.
Soc
"Patrick" wrote in message
news:ei3Nj4vUHHA.5100@TK2MSFTNGP06.phx.gbl...
> 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=dbpa ssword"
>
> 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=d bpassword"
>
> 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.
>
>
> "SOC" wrote in message
> news:uZTde4sUHHA.4844@TK2MSFTNGP03.phx.gbl...
> >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.
> >
> >
>
>

Re: database connection

am 18.02.2007 09:40:37 von Mike Brind

"Patrick" wrote in message
news:ei3Nj4vUHHA.5100@TK2MSFTNGP06.phx.gbl...
>
> "SOC" wrote in message
> news:uZTde4sUHHA.4844@TK2MSFTNGP03.phx.gbl...
>>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.
>>
> 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;

--
Mike Brind

Re: database connection

am 19.02.2007 02:10:21 von soc

Thanks Mike.
"Mike Brind" wrote in message
news:u95u3hzUHHA.4828@TK2MSFTNGP05.phx.gbl...
>
> "Patrick" wrote in message
> news:ei3Nj4vUHHA.5100@TK2MSFTNGP06.phx.gbl...
> >
> > "SOC" wrote in message
> > news:uZTde4sUHHA.4844@TK2MSFTNGP03.phx.gbl...
> >>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.
> >>
> > 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;
>
> --
> Mike Brind
>
>