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!

DBI Question

Status
Not open for further replies.

yim11

MIS
Jun 26, 2000
35
0
0
US
Hello,

If my perl scripts are on 1 server, and the SQL database I need to talk to is on a different server,
is there a way via DBI to connect to that database?

Something like:
my $DSN='dbname';
my $user = "loginname";
my $pass = "password";
my $DBD='ODBC';
my $server='123.456.789.0'
my $DBH=DBI->connect($DSN,$user,$pass,$DBD,$server);

I have read the DBI docs, but no mention is made of this so I was wondering if anyone has seen or done this before.

TIA for any and all assistance!
-jim
 
Hi Jim,

Two ways, that I know of, to do this.

1: Simplest way: If can install a ODBC driver on your client server you can connect to the Database through that.

2: There is a utility called dbiproxy which you can run on your database server, it listens for connection requests and allows remote clients to attahc to the DB in the way you need.

Any advance on wo ways anyone? Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top