Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Who deleted the records.

Status
Not open for further replies.
Hi,

I understand that....

Code:
select *
    from V$sqlarea
    where command_type = 7
    order by first_load_time desc;

...will allow one to see the DELETE-SQL statements issued on a particular table. My question is, is it possible that Oracle did not log the DELETE command issued (or possibly any command for that matter)? I asked because we did lose some records in a particular table but we were unable to determine the source or who made the deletion because it did not show up in the SQL statement above.

Thanks in advance.

kilroy [knight]
philippines

"Once a king, always a king. But being a knight is more than enough."
 
Hi,
Maybbe this can help:
Code:
SELECT sql_text, username, first_load_time
  FROM v$sqlarea s, dba_users u
 WHERE command_type = 7
   AND s.parsing_user_id = u.user_id
 ORDER BY first_load_time desc
 


Try logminer.
[3eyes]


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Do you have any CASCADE DELETE defined on the FK?
 
Thanks for all the replies. Sorry for my late feedback.

Anyway, I'm a software engr. and not really the DBA. Our DBA was on a vacation at the time when the problem happened. Interestingly, the problem in my original post happened again the next day. Again, no DELETE (and TRUNCATE) for that particular table. Actually we do not physically delete records. We just have a field in each table called MRK_DEL, numeric, field length of 1, and will contain 1 if it is "deleted", or 0 otherwise. Then we just use views to filter records that suit the users' requirements. We don't use the DELETE command in any of our front-end apps, thus, no CASCADE option either. That's why we were wondering how the records have gone missing. I was able to get the physically deleted records using the UNDO tablespace.

Code:
select * 
  from mytable 
  as of timestamp to_timestamp('<date & time of possible retrieval>','dd/mm/yyyy hh24:mi');


kilroy [knight]
philippines

"Once a king, always a king. But being a knight is more than enough."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top