Wednesday, February 3, 2021

How to Manage Data Concurrency in Oracle Database

 



SQL> update emp set sal=sal+1200 where empno=7369;

1 row updated.

How to check Table lock mode?

SQL> lock table emp in exclusive mode;


How to busy row?
SQL> lock table emp in share mode nowait;
lock table emp in share mode nowait
*
ERROR at line 1:
ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired

How to kill the session ?

SQL> select sid,serial# username from v$session where sid in (select bl
ocking_session from v$session);

       SID   USERNAME
---------- ----------
       258      55536

SQL> alter system kill session '258,55536' immediate;

System altered.

No comments:

Post a Comment

How to install and configure Oracle Apex 24.1 with ORDS 22, Tomcat 9 and Jasper Report 7 on Oracle Linux 8.10

#########################Install Oracle  APEX 24.1################################ ----------------------------------------------------...