|
|
|
|
Re: retrieve execution plan for running session in Oracle 8i database [message #292503 is a reply to message #292442] |
Wed, 09 January 2008 01:41 |
wkk1020
Messages: 10 Registered: January 2008 Location: Singapore
|
Junior Member |
|
|
Hi Michel, thanks for the advise!
I can get the execution plan now with the provided SQL.
I also found below way to generate sql trace (in bdump/udump)
using spid: -
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Obtain the SPID from v$process.
SQL> select username, spid from v$process;
Turn on SQL Trace for the session
SQL> conn / as sysdba
SQL> oradebug setospid 15750
SQL> oradebug unlimit
SQL> oradebug event 10046 trace name context forever, level 12
Turn off SQL Trace for the session
SQL> conn / as sysdba
SQL> oradebug setospid 15750
SQL> oradebug event 10046 trace name context off
Format Trace file using TKprof
- tkprof tracefile outfile
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Just to share......
[Updated on: Wed, 09 January 2008 01:42] Report message to a moderator
|
|
|
|
Re: retrieve execution plan for running session in Oracle 8i database [message #292791 is a reply to message #292521] |
Wed, 09 January 2008 20:49 |
rleishman
Messages: 3728 Registered: October 2005 Location: Melbourne, Australia
|
Senior Member |
|
|
V$SQLPLAN does not exist in 8i, so the best you could do would be to suck the SQL out of V$SQLTEXT and then run it through Explain Plan.
The problem is that in 8i, V$SQLTEXT busts the SQL up into equal-length strings and is hideously difficult to re-concatenate in syntactically correct form.
Ross Leishman
|
|
|