Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Serialize access to tables
Hi Shelby,
It seems to me that you can achieve the desired results by forcing all
connections to go through stored procedures, for reading and writing. ie
create all the
tables, procedures, and other objects under one schema then grant execute
privilege to the procedures (which do all the reading and writing) to
another schema. Then have all users connect to the schema having only
execute privilege. In this way you can control access to the tables. If you
wish to truly wish to serialize the process then set up a queue in the first
schema
to control access further. I advise against locking tables it can be very
problematic in a multi-user environment.
Nevin Hahn
nhahn_at_evoke.com
"Shelby Cain" <scain_at_remove-all-this-aisconsulting.com> wrote in message
news:uplJ5.12585$Fe4.384432_at_typhoon.austin.rr.com...
> Is there any way to lock a table (Oracle 8.0.x or 8.1.x) such that only
one
> session at a time could access it (even for just reading)? I need to be
> able to implement some sort of mutex in PL/SQL and this is driving me
crazy
> as it seems I can lock a table to deny writes to other sessions -- but
that
> does little good for me if I'm updating a value and before I've committed
it
> another session reads the old value.
>
> Any help or suggestions would be appreciated.
>
> Regards,
>
> Shelby Cain
>
>
>
Received on Wed Oct 25 2000 - 00:31:54 CDT
![]() |
![]() |