How to know who lock the Account ? [message #408824] |
Thu, 18 June 2009 00:05 |
halim
Messages: 100 Registered: September 2008
|
Senior Member |
|
|
Dears
In a online banking system,a user want to debit a global Account but it saying that locked by some other user.
It's happen very regularly in some particular accounts.
I would like to know the session/userid who locked that account.
is it possible to know? please help me
Regards
Halim
|
|
|
|
|
|
|
|
|
Re: How to know who lock the Account ? [message #409368 is a reply to message #408893] |
Mon, 22 June 2009 05:58 |
halim
Messages: 100 Registered: September 2008
|
Senior Member |
|
|
Dear Michel
what's Error in second query ? please help me
I googled it , is it help me .
SQL> select s.sid,b.object_name
2 , row_wait_obj#
3 , row_wait_file#
4 , row_wait_block#
5 , row_wait_row#
6 , dbms_rowid.rowid_create (1, ROW_WAIT_OBJ#, ROW_WAIT_FILE#,
7 ROW_WAIT_BLOCK#, ROW_WAIT_ROW#) rowidd
8 from v$session s, dba_objects b
9 where s.ROW_WAIT_OBJ# = b.OBJECT_ID
10 /
SID OBJECT_NAME ROW_WAIT_OBJ# ROW_WAIT_FILE# ROW_WAIT_BLOCK# ROW_WAIT_ROW# ROWIDD
---------- ----------------------- ------------------ ----- ------------- -------------
120 I_IND1 39 1 247 0 AAAAAnAABAAAAD3AAA
162 SCHEDULER$_QINFO_PK 5156 1 11226 0 AAABQkAABAAACvaAAA
161 WRI$_ALERT_OUTSTANDING 8850 3 2662 0 AAACKSAADAAAApmAAA
127 LK_PARAMETER 59110 16 3912 0 AAAObmAAQAAAA9IAAA
138 LK_ATM_LOCATION 59018 16 20 0 AAAOaKAAQAAAAAUAAA
125 STBASEL2 60436 9 34297 0 AAAOwUAAJAAAIX5AAA
118 STBASEL2 60436 9 34297 0 AAAOwUAAJAAAIX5AAA
113 STBASEL2 60436 9 34297 0 AAAOwUAAJAAAIX5AAA
8 rows selected.
SQL> select * from (
2 select s.sid,b.object_name
3 , row_wait_obj#
4 , row_wait_file#
5 , row_wait_block#
6 , row_wait_row#
7 , dbms_rowid.rowid_create (1, ROW_WAIT_OBJ#, ROW_WAIT_FILE#,
8 ROW_WAIT_BLOCK#, ROW_WAIT_ROW#) rowidd
9 from v$session s, dba_objects b
10 where s.ROW_WAIT_OBJ# = b.OBJECT_ID )
11 where rowidd='AAAOwUAAJAAAIX5AAA'
12 /
, dbms_rowid.rowid_create (1, ROW_WAIT_OBJ#, ROW_WAIT_FILE#,
*
ERROR at line 7:
ORA-01410: invalid ROWID
ORA-06512: at "SYS.DBMS_ROWID", line 38
SQL>
[Updated on: Mon, 22 June 2009 07:33] by Moderator Report message to a moderator
|
|
|
|