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

Home -> Community -> Usenet -> c.d.o.server -> Re: Lock Table

Re: Lock Table

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Thu, 8 Sep 2005 11:26:52 -0400
Message-ID: <uq2dnSMk3Kmhxb3eRVn-jA@comcast.com>

"HansF" <News.Hans_at_telus.net> wrote in message news:pan.2005.09.08.14.44.43.194209_at_telus.net...
> 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.
>>>
>>
>> So how can I test the unavailability of a table in an application? We
>> want to make sure the whole thing does not go belly up when table is not
>> there
>>
>
> 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 ***
>

for this type of checking, i would think ALL_TAB_PRIVS_RECD may be a better choice -- depending on how the application has end-users configured

++ mcs Received on Thu Sep 08 2005 - 10:26:52 CDT

Original text of this message

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