DUMP出一条数据,查找TRACE文件:

[aix1]:[/dsg]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on Mon Aug 26 15:59:31 2013
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
SQL> conn source/source
Connected.
SQL> SELECT ROWID FROM TBL_SQL_TEST_CASE WHERE ROWNUM<2;
ROWID
------------------
AAUv1zAAEAALwmLAAA

SQL> SELECT DBMS_ROWID.rowid_relative_fno('AAUv1zAAEAALwmLAAA') FILE_ID,
  2         DBMS_ROWID.rowid_block_number('AAUv1zAAEAALwmLAAA') BLOCK_ID
  3    FROM DUAL;

   FILE_ID   BLOCK_ID
---------- ----------
         4    3082635
SQL> ALTER SYSTEM DUMP DATAFILE 4 BLOCK 3082635;
System altered.
SQL> 
SQL> select c.value || '/' || d.instance_name || '_ora_' || a.spid || '.trc' trace
  2    from v$process a, v$session b, v$parameter c, v$instance d
  3   where a.addr = b.paddr
  4     and b.audsid = userenv('sessionid')
  5     and c.name = 'user_dump_dest';
TRACE
--------------------------------------------------------------------------------
/oracle11/app/oracle11/diag/rdbms/db11/db11/trace/db11_ora_319600.trc
SQL> SELECT TRACEFILE
  2    FROM V$PROCESS
  3   WHERE ADDR = (SELECT PADDR
  4                   FROM V$SESSION
  5                  WHERE SID = (SELECT USERENV('SID') FROM DUAL));
TRACEFILE
--------------------------------------------------------------------------------
/oracle11/app/oracle11/diag/rdbms/db11/db11/trace/db11_ora_319600.trc
SQL> SELECT VALUE FROM V$DIAG_INFO WHERE NAME='Default Trace File';
VALUE
--------------------------------------------------------------------------------
/oracle11/app/oracle11/diag/rdbms/db11/db11/trace/db11_ora_319600.trc
SQL> 

也可以通过设定参数TRACEFILE_IDENTIFIER,使用特定文件名,生成的trace文件是:
SQL> ALTER SESSION SET TRACEFILE_IDENTIFIER='CXF';
Session altered.
SQL> ALTER SYSTEM DUMP DATAFILE 4 BLOCK 3082635;
System altered.
SQL> SELECT VALUE FROM V$DIAG_INFO WHERE NAME='Default Trace File';
VALUE
--------------------------------------------------------------------------------
/oracle11/app/oracle11/diag/rdbms/db11/db11/trace/db11_ora_319600_CXF.trc
SQL> 

Trace文件的位置 
专用服务器:USER_DUMP_DEST参数指定的目录
共享服务器:BACKGROUND_DUMP_DEST参数指定的目录


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值