Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to use OCI/ODBC in multi-process programs?

Re: How to use OCI/ODBC in multi-process programs?

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Sun, 19 Sep 2004 06:00:41 +0200
Message-ID: <414d04c2$0$12625$626a14ce@news.free.fr>

"Jason Liang" <jxnliang_at_yahoo.co.jp> a écrit dans le message de news:caf30d77.0409181549.38ff49d9_at_posting.google.com...
> Are there other tools available to call from C, which can implement my progam?
>
>
> Regards,
>
>
> Jason Liang.
>
> jxnliang_at_yahoo.co.jp (Jason Liang) wrote in message
news:<caf30d77.0409180700.1e243a01_at_posting.google.com>...
> > Thanks Michel.
> >
> > I can't use thread, because I have to use another library that is not
> > thread-safe.
> >
> > I know if I open a file before forking a process, then the child
> > process will inherate the open file descriptor. I am not sure if a
> > child process inherate an open database connection - using OCI or
> > ODBC.
> >
> >
> > Regards,
> >
> > Jason Liang.
> >
> >
> >
> >
> > jxnliang_at_yahoo.co.jp (Jason Liang) wrote in message
news:<caf30d77.0409171949.2bf9d385_at_posting.google.com>...
> > > All,
> > >
> > > I have a multi-process program on HP-UX 11i enviroment, this program
> > > accesses Oracle database.
> > >
> > > Because the number of processes may be 20 or more, I need to create a
> > > shared connection among these processes.
> > >
> > > Could you tell me what interface(OCI or ODBC) can be used for this
> > > purpose, and how to use it?
> > >
> > > Thanks in advance.
> > >
> > > Sincerely,
> > >
> > >
> > > Jason Liang

If the issue is the number of processes, use dispatcher/shared server at Oracle level.

For an overview of this architecture, see: http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96524/c09procs.htm#CNCPT904

To know how to configure Oracle for shared server, see: http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96521/manproc.htm#13880

-- 
Regards
Michel Cadot
Received on Sat Sep 18 2004 - 23:00:41 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US