본문 바로가기

Database/Oracle

21 - [Oracle 19C] Dynamic Performance Views(v$ views)

 

 

show con_name
/*
CON_NAME 
------------------------------
CDB$ROOT
*/

--show pdbs

alter pluggable database orclpdb open;
/*

*/

alter session set container=orclpdb
/*
Session altered.
*/

show con_name
/*
CON_NAME 
------------------------------
ORCLPDB
*/

select oracle_username, os_user_name, locked_mode, object_name, object_type
from v$locked_object a,dba_objects b
where a.object_id = b.object_id;
/*
no rows selected
*/

 

 

select * from hr.employees;

 

 

 

 

 

update hr.employees
set salary=salary+1
where employee_id=100;
/*
1 row updated.
*/

select oracle_username, os_user_name, locked_mode, object_name, object_type
from v$locked_object a,dba_objects b
where a.object_id = b.object_id;
/*
ORACLE_USERNAME      OS_USER_NAME	  LOCKED_MODE OBJECT_NAME	   OBJECT_TYPE
-------------------- -------------------- ----------- -------------------- --------------------
SYS		     mike			    3 EMPLOYEES 	   TABLE
*/

rollback;
/*
Rollback complete.
*/

select oracle_username, os_user_name, locked_mode, object_name, object_type
from v$locked_object a,dba_objects b
where a.object_id = b.object_id;
/*
no rows selected
*/