Home » RDBMS Server » Server Administration » deletion on database
deletion on database [message #162726] Mon, 13 March 2006 05:55 Go to next message
chandanbhamra
Messages: 84
Registered: April 2005
Location: India
Member
is there any way i can find out if any delete statement is going on in the database ??
I queried v$sql where sql_text like '%DELETE%" but how i can asscoiate this with particular user. how i can know this statement is executed by which user ??

thanks & regards
Chandan Singh
Re: deletion on database [message #162755 is a reply to message #162726] Mon, 13 March 2006 08:27 Go to previous messageGo to next message
sach_sumit
Messages: 9
Registered: September 2005
Junior Member
hi

You can put a join based on the "address" and "hash value columns" in v$session and v$sql views where statement in v$sql has '%delete%' in it.

Based on it u can get a lot of information from v$session;

Regards
Sumit Sachdeva
Re: deletion on database [message #162856 is a reply to message #162755] Mon, 13 March 2006 22:01 Go to previous message
chandanbhamra
Messages: 84
Registered: April 2005
Location: India
Member
This query gives me the details of query associated with user based on sql_address & address of v$session & v$sql respectively.

select a.sid,a.status,a.program,
       a.username,a.osuser,a.terminal,
       b.sql_text 
 from v$session a,v$sql b
where a.sql_address = b.address
order by 2


Thanks & Regards
Chandan Singh
Previous Topic: Trace Files Owned by Root Instead of Oracle user
Next Topic: about spfile
Goto Forum:
  


Current Time: Fri Jan 10 17:04:44 CST 2025