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 -> Locking Table

Locking Table

From: <hi_wean_at_my-dejanews.com>
Date: Tue, 25 May 1999 08:47:58 GMT
Message-ID: <7ido3u$fhs$1@nnrp1.deja.com>


Hi there,

I've a table, tbl_runno as following:

appln_type	VARCHAR2(10)
runno		NUMBER(5)

Here are the scenarios,

1. Open a Oracle session, logon as 'user1'
2. SELECT runno FROM tbl_runno; return as 5
3. UPDATE tbl_runno SET runno = runno + 1; should be = 6
4. Do not COMMIT till all the transactions are successfully executed.
5. At the same time (1 second later), another Oracle session, logon as
'user1' as well
6. SELECT runno FROM tbl_runno; return as 5 still.

Questions:
1. How can the 2nd user get runno = 6, when the 1st user still has not issue the COMMIT statement?
2. Is it any LOCK available in Oracle 8.0.5?

Can anyone help me on these? Thank ou very much!

Best Regards
HW

--== Sent via Deja.com http://www.deja.com/ ==-- ---Share what you know. Learn what you don't.--- Received on Tue May 25 1999 - 03:47:58 CDT

Original text of this message

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