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: How to Lock and unlock a table until SP completes

Re: How to Lock and unlock a table until SP completes

From: <Peter.McLarty_at_mincom.com>
Date: Sun, 03 Aug 2003 23:09:23 -0800
Message-ID: <F001.005C8AAF.20030803230923@fatcity.com>


Hmm I see a major performance issue coming on

Seems that your program might have some other bugs in it as what you want to do isn't a very good approach to solving your problem. For performance and scalability your application doesn't want you doing table locks as you will soon learn.

If it wont breach any confidentiality I suggest you post a more detailed description of your problem to get a real solution instead of applying what maybe a really bad band aid to your problem and yes Oracle can table lock
try the LOCK TABLE Statement as in
LOCK TABLE accts IN SHARE MODE;

Cheers

--

=================================================
Peter McLarty E-mail: Peter.Mclarty_at_mincom.com Technical Consultant WWW: http://www.mincom.com APAC Technical Services Phone: +61 (0)7 3303 3461 Brisbane, Australia Mobile: +61 (0)402 094 238 Facsimile: +61 (0)7 3303 3048
=================================================
"If people did not sometimes do silly things, nothing intelligent would ever get done." - Ludwig Wittgenstein
=================================================
Mincom "The People, The Experience, The Vision"
=================================================
This transmission is for the intended addressee only and is confidential information. If you have received this transmission in error, please delete it and notify the sender. The contents of this e-mail are the opinion of the writer only and are not endorsed by the Mincom Group of companies unless expressly stated otherwise. WLSH <wlsh1961_at_yahoo.com> Sent by: ml-errors_at_fatcity.com 04-08-2003 04:09 PM Please respond to ORACLE-L To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> cc: Subject: How to Lock and unlock a table until SP completes Dear List: How can I lock and then unlock a table? A SP only runs about 2 sec, but during its execution, sometimes there are more records saved to the table the SP is working on, then the SP confused. I want to be able to lock a table while the SP is executing, and then by the end, release the lock. Is there a way to do this? How? Can any one give me an example? Thanks Steven Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: INET: Peter.McLarty_at_mincom.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 Mon Aug 04 2003 - 02:09:23 CDT

Original text of this message

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