Home » RDBMS Server » Server Administration » Trace file name
Trace file name [message #364590] Tue, 09 December 2008 04:02 Go to next message
gajini
Messages: 262
Registered: January 2006
Senior Member
Hi,

My Oracle version is 10gR2 and server is HP Unix. I wants to enable sql trace file for some oracle sessions,to find the trace file generated in udump, We need to have OS Process Id of that session. But in HP Unix, v$session.process & v$process.spid is not showing the exact os process id. What I've to do to find out the exact trace file generated for that session in HP Unix?

Thanks...
Re: Trace file name [message #364591 is a reply to message #364590] Tue, 09 December 2008 04:05 Go to previous messageGo to next message
Michel Cadot
Messages: 68666
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
DBMS_MONITOR

Regards
Michel
Re: Trace file name [message #364595 is a reply to message #364591] Tue, 09 December 2008 04:16 Go to previous messageGo to next message
gajini
Messages: 262
Registered: January 2006
Senior Member
Hi Michel,

But the given doesn't contain information about how to find out the trace file name ?

Thanks..
Re: Trace file name [message #364597 is a reply to message #364595] Tue, 09 December 2008 04:21 Go to previous messageGo to next message
Michel Cadot
Messages: 68666
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
If you set tracefile_identifier parameter of your session it is included in the trace file name.

Quote:
We need to have OS Process Id of that session. But in HP Unix, v$session.process & v$process.spid is not showing the exact os process id.

This is wrong, I think you look at the wrong process.

Regards
Michel
Re: Trace file name [message #364607 is a reply to message #364595] Tue, 09 December 2008 04:30 Go to previous message
Michel Cadot
Messages: 68666
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Here's a query to find trace file name:
SQL> Select s.sid, s.username,
  2         i.instance_name || '_ora_' || ltrim(to_char(p.spid)) ||
  3           decode (p.traceid, null, '', '_'||p.traceid) || '.trc'
  4           TraceFile
  5  from v$session s, v$process p, v$instance i
  6  where p.addr = s.paddr
  7    and s.type = 'USER' and s.username is not null
  8  order by username, sid
  9  /
       SID USERNAME                       TRACEFILE
---------- ------------------------------ ------------------------------
       149 MICHEL                         mika_ora_9312.trc
       150 MICHEL                         mika_ora_8884.trc
       151 MICHEL                         mika_ora_8224.trc

3 rows selected.

Regards
Michel
Previous Topic: can not change SID
Next Topic: Upgradation from 9i to 10g
Goto Forum:
  


Current Time: Fri Jul 05 06:13:00 CDT 2024