How to Use ORADEBUG to Find out Trace file name

advertisements

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World
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.

_____________________________________________________________________________________________________________________

Website Stats

0 comments:

Post a Comment

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-23 All Rights Reserved | Site Map | Contact | Disclaimer