Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Lock Table
On Thu, 08 Sep 2005 22:40:41 +1200, Iain William Wiseman interested us by
writing:
> sybrandb_at_yahoo.com wrote:
>> If you require Oracle to behave like Sqlserver, you would better switch >> to Sqlserver. >> In Oracle it simply isn't possible to fully lock out readers. >>
Why would
SELECT COUNT(*) FROM USER_TABLES WHERE TABLE_NAME='xyz';
not work for you? Per your 'requirement', this would check whether the table exists and never fail as long as you have an Oracle database connection. You could then make a decision based on the existance of the table.
Manually managing locks is generally a bad thing to do in Oracle, especially if you come from another RDBMS. You will be using incorrect 'habits' and will likely defeat Oracle's built in scalability and possibly security. Recommend you read Tom Kyte's "Effective Oracle by Design" book for more on this.
-- Hans Forbrich Canada-wide Oracle training and consulting mailto: Fuzzy.GreyBeard_at_gmail.com *** I no longer assist with top-posted newsgroup queries ***Received on Thu Sep 08 2005 - 09:40:20 CDT