How to display message using default lock in ORACLE 9i [message #259160] |
Tue, 14 August 2007 09:45 |
sivasenthil
Messages: 4 Registered: August 2007
|
Junior Member |
|
|
I am using ORACLE 9i I am inserting a same record in a same table (which is having primary key) of same user with different sql editor (or from different machines).
with same time.
One person is able to insert the record..
But other one is in processing state, once the inserted person give commit,then only other person got the message "Primary key constraint voilated".
This is bcoz of concurrency in oracle. For this purpose Oracle uses default lock.
Is it possible to give message to other person like "One user is using this table..", after a record is inserted and before commit is get issued by the inserted user?
how can i do this?
|
|
|
|
|
|
|
|
|
|
|
Re: How to display message using default lock in ORACLE 9i [message #259203 is a reply to message #259175] |
Tue, 14 August 2007 11:34 |
|
Michel Cadot
Messages: 68728 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Quote: | Is there is any way to check the locked objects from system tables and display the message?
|
Table locks, there is (see previous post).
Row locks there is not, unless someone is waiting on a row then you can see on which row.
There are several scripts on PSOUG link posted previously.
Regards
Michel
|
|
|