怎樣能dump內部資料結構?

tolywang發表於2006-04-20

下列命令能用於獲得關於內部資料結構的資訊。

-- 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-84355/,如需轉載,請註明出處,否則將追究法律責任。

相關文章