How to Use ORADEBUG to Find out Trace file name

Facts on ORADEBUG
  1. You have to connect as sysdba to use/execute the ORADEBUG
  2. It can be executed from the SQLPlus prompt


Session 1
SQL> SELECT a.username, a.sid, a.serial#, b.spid, b.pid  FROM v$session a, v$process b WHERE a.paddr = b.addr AND a.username = 'SCOTT’;

USERNAME          SID    SERIAL# SPID                            PID
---------- ---------- ---------- ------------------------ ----------
SCOTT             653      14811 23936                           106

Session 2
Connecting to the Session 1 using ORADEBUG and OS process id (OSPID-SPID)

SQL> oradebug setospid 23936
Oracle pid: 106, Unix process pid: 23936, image: oracle@prod.diamond.net (TNS V)
SQL> oradebug tracefile_name
/u01/app/oracle/diag/rdbms/PROD2/PROD21/trace/PROD21_ora_23936.trc
SQL> oradebug setmypid
Statement processed.
SQL> oradebug tracefile_name
/u01/app/oracle/diag/rdbms/PROD2/PROD21/trace/PROD21_ora_17296.trc
SQL> oradebug setmypid
Statement processed.
DBA Tips Data Pump Reference

0 comments:

Post a Comment

 

dba topics. Copyright 2011-16 All Rights Reserved | Site Map | Contact | Disclaimer | Google