dojjol
asked on
last updated or inserted query
Hello All,
Is there a way I can find out the last update or inserted statement fired on database.
I tried select * from v$sql, it only gave me select statements.
Thanks.
Is there a way I can find out the last update or inserted statement fired on database.
I tried select * from v$sql, it only gave me select statements.
Thanks.
if you have triggers (or app code) that populates a "last_modified" (or similar) column in your tables that might work too.
ASKER
Thanks sdstuber.
How can I turn on auditing.
I am sorry It just that I am new to oracle world.
If possible can you also give pointers about logminer or flashback queries.
How can I turn on auditing.
I am sorry It just that I am new to oracle world.
If possible can you also give pointers about logminer or flashback queries.
to audit inserts/updates on any table...
for flashback you can select from table's "as of" a particular point in time - here I'm querying one minute ago
and then compare those results to current table to see what's different, if anything.
note, this won't tell you want the insert/update was, only that that something changed
audit insert table, update table;
for flashback you can select from table's "as of" a particular point in time - here I'm querying one minute ago
and then compare those results to current table to see what's different, if anything.
select * from my_table as of timestamp (systimestamp - interval '1' minute)
note, this won't tell you want the insert/update was, only that that something changed
log miner is a bit much to go into for a Q&A forum
but if you're interested...
http://download.oracle.com/docs/cd/E11882_01/server.112/e22490/logminer.htm#SUTIL019
but if you're interested...
http://download.oracle.com/docs/cd/E11882_01/server.112/e22490/logminer.htm#SUTIL019
ASKER
thanks sdstuber,
is there a way that we can check the sequence of triggers executed.
is there a way that we can check the sequence of triggers executed.
not that I know of. triggers are non-transactional. so unless you can capture a sql statement that invokes them I don't know of a way to track them directly.
ASKER
Hey sdstuber,
I did print statement, to work it this time, also found out oracle 11g supports the trigger sequence, so by that time will wait to move to oracle 11.
By any chance could you let me know get the parameter values for sql statements we see on running select * from v$sql;
I did print statement, to work it this time, also found out oracle 11g supports the trigger sequence, so by that time will wait to move to oracle 11.
By any chance could you let me know get the parameter values for sql statements we see on running select * from v$sql;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks I used v$sql_bind_capture.
Thanks sdstuber
Thanks sdstuber
otherwise you'll have to approximate with flashback queries, or logminer