A reader, April 09, 2002 - 9:46 pm UTC
This looks familiar....
Mark J. Bobak, April 09, 2002 - 10:57 pm UTC
Or you could just check Doc ID 338634.999 on MetaLink,
which is a forum thread where you asked the same question
and I answered it in detail...and also referred you
to the Concepts manual....;-)
-Mark
RE: This looks familiar...
Mark A. Williams, April 10, 2002 - 10:12 am UTC
Mark:
Surely you don't expect people to actually read the Oracle documentation. Unheard of! I mean, what else would Tom do?
Just look at today's questions... "svrmgrl is gone in 9i??? Gosh, what do I do???" Tom must be "ghost writing" a lot of applicationsl...
(Of course, this is somewhat tongue-in-cheek, as I make my fair share of mistakes, etc...)
- Mark
This looks familiar
Mark J. Bobak, April 10, 2002 - 11:38 am UTC
Yeah, we all do make our fair share of mistakes....
But I agree with Tom that the Concepts manual is the most
valuable and overlooked piece of documentation out there.
Concepts Guide Rules!
Debi Lorraine, September 03, 2002 - 7:34 pm UTC
A developer asked me an "obscure" question about how to achive "read consistency" throughout a session. We both thought of "asking Tom" but alas, Tom was not taking any questions at the time. A search of the archives and asking myself, "What would Tom Do?" (WWTD) led me to the concepts guide recommended here, and to the ultimate answer:
alter session set isolation_level = serializable;
Yes, I am convert to reading the concepts guide! Sorry, I have strayed ~somewhat~ from the topic...
Read-Only and Lock table
Yogesh Purabiya, May 21, 2005 - 1:26 pm UTC
Recently I was going through an old document (SQL Reference Language Manual of Oracle 7.3).
In the topic of "SET TRANSACTION" and the option of "READ ONLY", the manual gave (gives) a list of statements that can be given during a READ-ONLY-Transaction. It includes "LOCK TABLE" ! (It gave me a surprise)
I cannot give SELECT FOR UPDATE; but I can give LOCK TABLE !
( Well, I tried out and found as per the manual. )
I want to know what a user would get by LOCK TABLE during a READ-ONLY-Transaction.
May 21, 2005 - 2:20 pm UTC
didn't say they "would gain anything", just that the activity is not prohibited.
set transaction read only prevents you from modifying data -- lock table doesn't modify anything, hence it is not prevented.
READ ONLY Transaction & LOCK TABLE
Yogesh Purabiya, May 23, 2005 - 1:19 pm UTC
Then, READ ONLY blocks the WRITES.
Can we say READ blocks WRITES ?!
May 23, 2005 - 7:02 pm UTC
read only prevents the session that said "make me read only" from writing data.
You cannot in any way shape or form say "reads block writes" from this.
You can say "a lock table command may be used to prevent modifications to a table"
READ ONLY Transaction & LOCK TABLE
Yogesh Purabiya, May 23, 2005 - 1:21 pm UTC
SELECT FOR UPDATE also does not update, it only locks few / some / all rows.
But that is not allowed.
While, the whole table can be locked !
May 23, 2005 - 7:06 pm UTC
I'm not understanding your point at all.
And select for update actually does go out and modify things (blocks). It gets locks on the rows, and to do that you modify blocks because row locks which are only limited by the number of rows in your database are attributes of the data itself.
A table lock is on the other hand, not.
Lock table locks the table at the table level. It is a permitted command in a read only table. It modifies *nothing*
select for update however is not a permitted command in a read only transaction.
A read only transaction simply prevents modifications (unless you are SYS in which case all bets are off, no such thing as readonly for SYS). That is all. Select for update actually touches the rows, modifies them, by locking them.
Read Only & Table Lock
Yogesh Purabiya, May 24, 2005 - 10:58 am UTC
Thanks ...
Now it is pretty clear.