Today, someone in my system has updated unexpected statement. So that makes my system run incorrect. Now, I would like to see log who (or which session) did it. May I find it in AWR report ? And if I can find it in AWR report, where is it particularly ? Thanks so much !
The change could be in many sources, depending on how it was made. Only the last option, Log Miner, will give you exactly everything you want. But it also requires the most effort. Some sources won't tell you the session, but maybe just seeing the relevant SQL will be enough to figure out who did it.
select * from v$sql where lower(sql_text) like '%table_name%';
.select * from dba_hist_sqltext where lower(sql_text) like '%table_name%';
, and then if you're lucky you can find out some session information from select * from dba_hist_active_sess_history where sql_id = '<sql id>';
. Active Session History only samples activity, if the query ran very quickly there's a good chance it won't be in there.select VERSIONS_STARTSCN, VERSIONS_STARTTIME, VERSIONS_ENDSCN, VERSIONS_ENDTIME, VERSIONS_XID, VERSIONS_OPERATION, your_table.* from your_table versions between scn minvalue and maxvalue;