Steven Baldwin wrote:

> Actually, if you're only concerned about restricting the number of
> connections to the DB, you may be able to use the multi-threaded server
> capabilities of SQL*Net.  Of course, you will need to connect through
> SQL*Net in your Perl program, even if your Perl program is running on the
> same machine as your DB.  I'm not whether from a licensing perspective they
> count logical connections, or physical connections.  If it's the former,
> you're still screwed.

Does Oracle has another client driver besides SQL*Net?
Maybe this another driver have some kind of private IPC handle.
That sharing $dbh under this driver will cause segmentation fault or other
system exceptions?
But maybe use SQL*Net can let me sharing $dbh by processes?

       PERL(DBI/DBD)
        ----------------
        Client Libraries  <-- socket --> Database Engine
             HOST  A                                 HOST  B


As an UNIX programmer I am curious about ORACLE.
Why it is so EXPENSIVE?
And, could you help me to test the following scripts using SQL*Net?
----------------------------------------
use DBI;

my $db = DBI->connect(...)
    or die $DBI::errstr;

my $pid = fork;
if($pid == 0) {
        my $st = $db->prepare("select * from customer");
        $st->execute;
        $st->finish;
        while ($st->fetchrow_hashref) {};
}
exit;
----------------------------------------
use DBI;

my $db = DBI->connect(...)
    or die $DBI::errstr;
my $st = $db->prepare("select * from customer");

my $pid = fork;
if($pid == 0) {
        $st->execute;
        $st->finish;
        while ($st->fetchrow_hashref) {};
}
exit;
----------------------------------------


>
> ----Original Message-----
> From: CHEN SEI-LIM [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 12 November 2001 2:34 PM
> To: Steven Baldwin; [EMAIL PROTECTED]
> Subject: Re: forking and DBI
>
> Steven Baldwin wrote:
>
> > An approach I have found that works *using Oracle* is ...
> >
> > Connect Parent
> > :
> > : (Do whatever Oracle bits the parent needs to do)
> > :
> > In fork routine
> >         Disconnect
> >         Do fork
> >         Reconnect in both child and parent
> >
> > If anyone has an alternative to requiring the parent to disconnect before
> > the fork, and reconnect after, I'd love to see it.
> >
> > Steve
>
> It has no means. It still makes one connection per process.
> And we still have to buy enough connections that we need.
> Sharing $dbh between processes can save our money
> Because we do not have to buy so many connections.

Reply via email to