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-----
From: John Dunn [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 14, 2003 10:04 AM
To: Multiple recipients of list ORACLE-L
Subject: Lock table and disallow select
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?
--
*********************************************************************This e-mail message is confidential, intended only for the named recipient(s) above and may contain information that is privileged, attorney work product or exempt from disclosure under applicable law. If you have received this message in error, or are not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 and delete this e-mail message from your computer, Thank you.*********************************************************************1