| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: (Java) Synchronizing multiple app servers through Oracle
On Dec 12, 9:04 pm, chrism..._at_gmail.com wrote:
> On Dec 12, 8:33 pm, Steve Howard <stevedhow..._at_gmail.com> wrote:
>
>
>
> > On Dec 12, 8:10 pm, chrism..._at_gmail.com wrote:
>
> > > What is the recommended way for using an Oracle database to
> > > synchronize multiple app servers? When I speak of synchronizing, I'm
> > > referring to the Java use of the word, where you can lock a section of
> > > code so other threads don't access that section at the same time.
>
> > > I have multiple app servers that each need exclusive access to the
> > > database for a certain operation. Does Oracle have a semaphore
> > > utility that is available to apps? I know I could hack it by doing a
> > > select for update on a dummy table with 1 row, but I was hoping Oracle
> > > had something more elegant to use.
>
> > > Thanks.
>
> > Hi,
>
> > Oracle locks rows by default (it doesn't matter if it's java, C#, VB,
> > C, SQL*Plus, etc.), but I don't know what you mean "exclusive access
> > to the database for a certain operation". If you have a need for more
> > sophisticated application locking, look into the procedures in the
> > dbms_lock package at tahiti.oracle.com
>
> > HTH,
>
> > Steve
>
> dbms_lock sounds like exactly what I'm looking for. It doesn't appear
> to be part of Oracle 10g (the version I'm using). Is it downloadable
> from the Oracle web site? I didn't find it my first try.
>
> Thanks.
AFAIK, dbms_lock is part of the standard installation.
In SQL*PLus, type desribe dbms_lock to see if it is already installed.
If it not in your database for whatever reason, it can be installed by running dbmslock.sql under $ORACLE_HOME/rdbms/admin
HTH, Steve Received on Wed Dec 12 2007 - 20:16:18 CST
![]() |
![]() |