SQL> connect a/a
Connected.
SQL> create table emp ( x int );
Table created.
SQL> select * from emp;
no rows selected
SQL> connect b/b
Connected.
SQL> create table emp ( x int );
Table created.
SQL> select * from emp;
no rows selected
SQL> conn scott/tiger
Connected.
SQL> select * from emp;
SQL> conn c/c
Connected.
SQL> select * from emp;
SQL> conn/as sysdba
Connected.
SQL> select address??hash_value?? executions?? sql_text
from v$sql
where upper(sql_text) like 'SELECT * FROM EMP%'
/
ADDRESS  HASH_VALUE EXECUTIONS SQL_TEXT
-------- ---------- ---------- ------------------------
78B89E9C 3011704998          1 select * from emp
78B89E9C 3011704998          1 select * from emp
78B89E9C 3011704998          2 select * from emp
...

????????????????????????????????HASH???????????????????????????????к??????????????????????????????仹???????????????????鹲?????SQL?????????????????????????????
??????????????????v$sql_shared_cursor????SQL??β??????????

 

SQL> select kglhdpar?? address??
auth_check_mismatch?? translation_mismatch
from v$sql_shared_cursor
where kglhdpar in
( select address
from v$sql
where upper(sql_text) like 'SELECT * FROM EMP%' )
/
KGLHDPAR ADDRESS  A T
-------- -------- - -
78B89E9C 786C9D78 N N
78B89E9C 786AC810 Y Y
78B89E9C 786A11A4 Y Y
...