SQL Language (MOSC)

MOSC Banner

How to trace the sql statements executed by a specific user

edited Jun 17, 2014 12:00PM in SQL Language (MOSC) 2 commentsAnswered

Hi, I am using the following trigger to trace the sql statements executed by a specific user. I am having a lot of trace files also. But how can I list down the sql statements only from those .trc files ?

Or, is there any other way to trace and list the sql statements executed by a specific user ?

MOS doc 309798.1

create or replace trigger SCOTTLOG

after logon

on scott.schema

begin

   -- optionally add a tag to the trace file name to make the files discernable:

   execute immediate ' ALTER SESSION SET TRACEFILE_IDENTIFIER =''SCOTT''';

   -- enable sql_trace for this session:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center