Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show all queries coming to an Oracle database

Tags:

I need to see all queries coming to database. How to do that? I could not get proper results from a Google search.

like image 745
user1186971 Avatar asked Feb 03 '12 07:02

user1186971


1 Answers

Enable SQL Trace & all the queries coming to the database will be logged.

ALTER SESSION SET sql_trace = true; ALTER SESSION SET tracefile_identifier = mysqltrace; 

The trace file will be present in the udump directory.

If you want to audit the database, look at my previous answer.

like image 173
Sathyajith Bhat Avatar answered Sep 21 '22 20:09

Sathyajith Bhat