Sessions and locks.
--- a/oracle.rst Mon Oct 15 19:51:13 2018 +0300
+++ b/oracle.rst Sun Oct 21 13:22:58 2018 +0300
@@ -331,6 +331,37 @@
show parameter user_dump_dest;
+Sessions and locks
+==================
+
+Select locked objects::
+
+ select * from v$locked_object;
+
+ select * from v$locked_object a, all_objects b
+ where a.object_id = b.object_id;
+
+ select b.owner, b.object_name, a.oracle_username, a.os_user_name
+ from v$locked_object a, all_objects b
+ where a.object_id = b.object_id;
+
+ select
+ c.owner,
+ c.object_name,
+ c.object_type,
+ b.sid,
+ b.serial#,
+ b.status,
+ b.osuser,
+ b.machine
+ from v$locked_object a, v$session b, dba_objects c
+ where b.sid = a.session_id and a.object_id = c.object_id;
+
+Kill session::
+
+ alter system kill session 'SID,SERIAL#';
+ alter system kill session '361,565';
+
Installing express edition
==========================