Re: SQL*Net for Linux?

From: Terry Greenlaw <z50816_at_mip.lasc.lockheed.com>
Date: 1996/02/01
Message-ID: <4eqkqo$uck_at_pong.lasc.lockheed.com>#1/1


In article <4eoppr$146_at_news.mcl.bdm.com>, rrowley_at_bdm.com (Ray Rowley) writes:
> Here's a good one...
>
> We're developing cgi code on a Linux system that needs to query an Oracle 7
> server on a local network. I know one option is to run the SCO Unix
> compatibility with Linux and use Oracle's SCO client software. Another option
> is to scrap Linux and run Solaris x86 on our web server. However, we don't
> want to scrap Linux (yet) and we would rather not run Linux with SCO
> compatibility.
>
> Can anyone suggest another solution for connecting Linux clients to Oracle
> servers? Thanks in advance.
>

It's pretty easy if you have Perl5 and DBI/DBD-Oracle (or Perl4 and Oraperl) on the same box as either the database or SQL*Net. If your cgi is in Perl, it only takes about 15-20 lines of code to add a socket client piece. The client passes the SQL to a Perl daemon (also about 20 lines of code) running on the box with Oracle or SQL*Net. The daemon process does the real SQL work and passes the results back to your cgi process. If you don't mind dedicating the resources, you can leave the server process logged into Oracle, have a passthrough process running on your client that also stays running, and stay logged into Oracle with a single socket pair between client and server and connect to the passthrough on the client using pipes. That way you avoid the delay of server startup, socket binding, and Oracle login, and only need about 5 lines of code in your cgi script to pump the data to the passthrough. It's possible to replace SQL*Net altogether if you're just dealing with TCP/IP and Unix. Of course, you could also write this in non-Perl, but why?

tog

Terry Greenlaw (on-site _at_ Lockheed Martin)               Encompass Technologies
z50816_at_mip.lasc.lockheed.com                             terry_at_encompass.is.net
Received on Thu Feb 01 1996 - 00:00:00 CET

Original text of this message