ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 对Oracle数据库内部结构进行dump的方法

对Oracle数据库内部结构进行dump的方法

原创 Linux操作系统 作者:tolywang 时间:2005-01-26 00:00:00 0 删除 编辑
转载自orafaq,对希望研究oracle internel的各位会有用处。

下面的这些命令(基本上为undocumented的)有助于我们取得oracle的internal database structures



-- Dump control file contents
alter session set events 'immediate trace name CONTROLF level 10'
/

-- Dump file headers
alter session set events 'immediate trace name FILE_HDRS level 10'
/

-- Dump redo log headers
alter session set events 'immediate trace name REDOHDR level 10'
/

-- Dump the system state
-- NOTE: Take 3 successive SYSTEMSTATE dumps, with 10 minute intervals
alter session set events 'immediate trace name SYSTEMSTATE level 10'
/

-- Dump the process state
alter session set events 'immediate trace name PROCESSSTATE level 10'
/

-- Dump Library Cache details
alter session set events 'immediate trace name library_cache level 10'
/

-- Dump optimizer statistics whenever a SQL statement is parsed (hint: change statement or flush pool)
alter session set events '10053 trace name context forever, level 1'
/

-- Dump a database block (File/ Block must be converted to DBA address)
-- Convert file and block number to a DBA (database block address). Eg:
variable x varchar2;
exec :x := dbms_utility.make_data_block_address(1,12);
print x
alter session set events 'immediate trace name blockdump level 50360894'
/


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/35489/viewspace-84266/,如需转载,请注明出处,否则将追究法律责任。

上一篇: ORACLE学习笔记(zt)
请登录后发表评论 登录
全部评论
Oracle , MySQL, SAP IQ, SAP HANA, PostgreSQL, Tableau 技术讨论,希望在这里一起分享知识,讨论技术,畅谈人生 。

注册时间:2007-12-10

  • 博文量
    5595
  • 访问量
    13385283