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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Lock table and disallow select

RE: Lock table and disallow select

From: Jamadagni, Rajendra <Rajendra.Jamadagni_at_espn.com>
Date: Fri, 14 Feb 2003 07:29:32 -0800
Message-ID: <F001.0054D9C9.20030214072932@fatcity.com>


Aren't we looking for trouble with this scenario? What if you hold lock for more than few seconds/minutes/hours? I'd ask following questions ...

  1. Why?
  2. Why?

AFAIK one way to do this is to break the synonym pointing to the database, but any other code owned by the same schema will continue to look at a read consistent image of the table. Also by breaking the synonym, you risk having invalid code in the database and it is a cascading effect...

Seriously, I'd find why your user would like to do this. Raj



Rajendra Jamadagni MIS, ESPN Inc.
Rajendra dot Jamadagni at ESPN dot com
Any opinion expressed here is personal and doesn't reflect that of ESPN Inc.

QOTD: Any clod can have facts, but having an opinion is an art!

-----Original Message-----
Sent: Friday, February 14, 2003 10:04 AM To: Multiple recipients of list ORACLE-L

Query from user. can the following be done in PL/SQL?

> I need to be able to lock a table in such a way that not only can no other
> session alter any records in the table, but they cannot read the table at
> all (i.e. do SELECTs on it) until I'm done with it.
>
> Any SELECT statements would pause until I release the lock.
>
> Is such a thing possible?

-- 




-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Jamadagni, Rajendra INET: Rajendra.Jamadagni_at_espn.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).

Received on Fri Feb 14 2003 - 09:29:32 CST

Original text of this message

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