This is sorta OT, but, also, check out fgac,
its more work than 10046 and doesn't provide
trace info, but it's cool cuz you have
all the sql stored and easy to get to
(tho, without trace info, so, really
it useful if this app is running tons
of sql and you just wanna see the sql and
the bind variables and have it
all a simple select away):
small example:
SQL> begin
2 dbms_fga.add_policy(USER,'EMP','EMPFGA','1=1');
3 end;
4 /
PL/SQL procedure successfully completed.
/* I'm gonna surpress the output of the sql here */
SQL> select 'hello' from emp;
SQL> select count(*) from emp;
SQL> variable x number
SQL> exec :x:=10
PL/SQL procedure successfully completed.
SQL> select * from emp where deptno = :x
SQL> variable y varchar2(10)
SQL> exec :y := 'JONES'
PL/SQL procedure successfully completed.
SQL> SELECT * FROM EMP WHERE ENAME = :Y
/* now, checking dba_fga_audit_trail */
SQL> select sql_text, sql_bind from dba_fga_audit_trail;
SQL_TEXT SQL_BIND
----------------------------------------- -----------
select 'hello' from emp
select count(*) from emp
select * from emp where deptno = :x #1(2):10
SELECT * FROM EMP WHERE ENAME = :Y #1(5):JONES
and I can see all the sql and the bind variable values
run against emp.
it's not really for tracing, as 10046 is, but,
it's nice to be able to audit the sql and bind
variables against specific table and see it with
a simple select (tho, you can make an external
table from the 10046 trace and do the same there
as well ;)
- ant
-----Original Message-----
From: Patterson Joel
[mailto:oracledba-ezmlmshield-x57028071.[Email address protected]
Sent: Thursday, June 30, 2005 3:11 PM
To: LazyDBA Discussion
Subject: RE: Trace session SQL
Sys
Execute dbms_system.set_sql_trace_in_session(sid,serial#,true)
Then
....false)
output in udump, use tkprof to convert it
type tkprof for parameters.
-----Original Message-----
From: James Oddo
[mailto:oracledba-ezmlmshield-x15088237.[Email address protected]
Sent: Thursday, June 30, 2005 3:08 PM
To: LazyDBA Discussion
Subject: Trace session SQL
Anyone have the steps needed to turn on tracing for a current running
session to trace the SQL that is being run in that session....I have a
canned application that is running queries on my database and there is
one function(applictation lookup) I need to capture
Oracle 9.2.0.5
Windows 2000
thanks
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
Oracle LazyDBA home page