2017  Kodetalk | Feedback | Privacy Policy | Terms | About
userimage

Find out the history of SQL queries

Is there anyway to find the queries that are fired to a database. Atleast for past one weak
userimage

We can also see the history of the queries fired from sql developer in below patch.

View->SQL history.

userimage

There are few tables which store history of queries fired, out of which v$sql table is very convenient to find queries date wise..


Select v.SQL_TEXT,

           v.PARSING_SCHEMA_NAME,

           v.FIRST_LOAD_TIME,

           v.DISK_READS,

           v.ROWS_PROCESSED,

           v.ELAPSED_TIME,

           v.service

      from v$sql v

v.FIRST_LOAD_TIME like '2015-12-12%'

Answer is