{"id":2439,"date":"2010-09-25T14:09:23","date_gmt":"2010-09-25T06:09:23","guid":{"rendered":"http:\/\/www.killtest.com.tw\/?p=2439"},"modified":"2010-09-25T14:09:23","modified_gmt":"2010-09-25T06:09:23","slug":"oracle-dump","status":"publish","type":"post","link":"https:\/\/www.killtest.com.tw\/?p=2439","title":{"rendered":"Oracle\u7684dump\u547d\u4ee4\u8207dump\u51fd\u6578"},"content":{"rendered":"<p>\u58f9.Memory Dumps<\/p>\n<p>1).Global Area<\/p>\n<p>ALTER SESSION SET EVENTS \u2018immediate trace name global_area level n\u2019;<\/p>\n<p>1 \u5305\u542bPGA<\/p>\n<p>2 \u5305\u542bSGA<\/p>\n<p>4 \u5305\u542bUGA<\/p>\n<p>8 \u5305\u542bindrect memory<\/p>\n<p>2).Library Cache<\/p>\n<p>ALTER SESSION SET EVENTS \u2018immediate trace name library_cache level n\u2019;<\/p>\n<p>1 library cache\u7d71\u8a08\u4fe1\u606f<\/p>\n<p>2 \u5305\u542bhash table histogram<\/p>\n<p>3 \u5305\u542bobject handle<\/p>\n<p>4 \u5305\u542bobject\u7d50\u69cb\uff08Heap 0\uff09<\/p>\n<p>3).Row Cache<\/p>\n<p>ALTER SESSION SET EVENTS \u2018immediate trace name row_cache level n\u2019;<\/p>\n<p>1 row cache\u7d71\u8a08\u4fe1\u606f<\/p>\n<p>2 \u5305\u542bhash table histogram<\/p>\n<p>8 \u5305\u542bobject\u7d50\u69cb<\/p>\n<p>4).Buffers<\/p>\n<p>ALTER SESSION SET EVENTS \u2018immediate trace name buffers level n\u2019;<\/p>\n<p>1 buffer header<\/p>\n<p>2 level 1 + block header<\/p>\n<p>3 level 2 + block contents<\/p>\n<p>4 level 1 + hash chain<\/p>\n<p>5 level 2 + hash chain<\/p>\n<p>6 level 3 + hash chain<\/p>\n<p>8 level 4 + users\/waiters<\/p>\n<p>9 level 5 + users\/waiters<\/p>\n<p>10 level 6 + users\/waiters<\/p>\n<p>5).Buffer<\/p>\n<p>ALTER SESSION SET EVENTS \u2018immediate trace name buffer level n\u2019;<\/p>\n<p>n\u70ba\u67d0\u500b\u6307\u5b9ablock\u7684rdba\uff0c\u8a72\u547d\u4ee4\u53ef\u4ee5\u8f49\u5132\u67d0\u500bblock\u5728buffer\u4e2d\u7684\u6240\u6709\u7248\u672c\u3002<\/p>\n<p>6).Heap<\/p>\n<p>ALTER SESSION SET EVENTS \u2018immediate trace name heapdump level level\u2019;<\/p>\n<p>1 PGA\u6458\u8981<\/p>\n<p>2 SGA\u6458\u8981<\/p>\n<p>4 UGA\u6458\u8981<\/p>\n<p>8 Current call(CGA)\u6458\u8981<\/p>\n<p>16 User call(CGA)\u6458\u8981<\/p>\n<p>32 Large call(LGA)\u6458\u8981<\/p>\n<p>1025 PGA\u5167\u5bb9<\/p>\n<p>2050 SGA\u5167\u5bb9<\/p>\n<p>4100 UGA\u5167\u5bb9<\/p>\n<p>8200 Current call\u5167\u5bb9<\/p>\n<p>16400 User call\u5167\u5bb9<\/p>\n<p>32800 Large call\u5167\u5bb9<\/p>\n<p>7).Sub Heap<\/p>\n<p>Oracle 9.0.1\u7248\u672c\u4e4b\u524d<\/p>\n<p>ALTER SESSION SET EVENTS \u2018immediate trace name heapdump_addr level n\u2019;<\/p>\n<p>\u82e5n\u70basubheap\u7684\u5730\u5740\uff0c\u8f49\u5132\u7684\u662fsubheap\u7684\u6458\u8981\u4fe1\u606f<\/p>\n<p>\u82e5n\u70basubheap\u7684\u5730\u5740+1\uff0c\u8f49\u5132\u7684\u5247\u662fsubheap\u7684\u5167\u5bb9<\/p>\n<p>Oracle 9.2.0\u7248\u672c\u4e4b\u5f8c<\/p>\n<p>ALTER SESSION SET EVENTS \u2018immediate trace name heapdump_addr level n, addr m\u2019;<\/p>\n<p>\u5176\u4e2dm\u70basubheap\u7684\u5730\u5740<\/p>\n<p>n\u70ba1\u8f49\u5132subheap\u7684\u6458\u8981\uff0cn\u70ba2\u8f49\u5132subheap\u7684\u5167\u5bb9<\/p>\n<p>8).Process State<\/p>\n<p>ALTER SESSION SET EVENTS \u2018immediate trace name processstate level n\u2019;<\/p>\n<p>9).System State<\/p>\n<p>ALTER SESSION SET EVENTS \u2018immediate trace name systemstate level n\u2019;<\/p>\n<p>10).Error State<\/p>\n<p>ALTER SESSION SET EVENTS \u2018immediate trace name errorstack level n\u2019;<\/p>\n<p>0 Error stack<\/p>\n<p>1 level 0 + function call stack<\/p>\n<p>2 level 1 + process state<\/p>\n<p>3 level 2 + context area<\/p>\n<p>11).Hang Analysis<\/p>\n<p>ALTER SESSION SET EVENTS \u2018immediate trace name hanganalyze level n\u2019;<\/p>\n<p>12).Work Area<\/p>\n<p>ALTER SESSION SET EVENTS \u2018immediate trace name workareatab_dump level n\u2019;<\/p>\n<p>1 SGA\u4fe1\u606f<\/p>\n<p>2 Workarea Table\u6458\u8981\u4fe1\u606f<\/p>\n<p>3 Workarea Table\u8a73\u7d30\u4fe1\u606f<\/p>\n<p>13).Latches<\/p>\n<p>ALTER SESSION SET EVENTS \u2018immediate trace name latches level n\u2019;<\/p>\n<p>1 latch\u4fe1\u606f<\/p>\n<p>2 \u7d71\u8a08\u4fe1\u606f<\/p>\n<p>14).Events<\/p>\n<p>ALTER SESSION SET EVENTS \u2018immediate trace name events level n\u2019;<\/p>\n<p>1 session<\/p>\n<p>2 process<\/p>\n<p>3 system<\/p>\n<p>15).Locks<\/p>\n<p>ALTER SESSION SET EVENTS \u2018immediate trace name locks level n\u2019;<\/p>\n<p>16).Shared Server Process<\/p>\n<p>ALTER SESSION SET EVENTS \u2018immediate trace name shared_server_state level n\u2019;<\/p>\n<p>n\u53d6\u503c\u70ba1~14<\/p>\n<p>17).Background Messages<\/p>\n<p>ALTER SESSION SET EVENTS \u2018immediate trace name bg_messages level n\u2019;<\/p>\n<p>n\u70bapid+1<\/p>\n<p>\u4e8c.File Dumps<\/p>\n<p>1).Block<\/p>\n<p>Oracle 7\u4e4b\u524d<\/p>\n<p>ALTER SESSION SET EVENTS \u2018immediate trace name blockdump level n\u2019;<\/p>\n<p>n\u70bablock\u7684rdba<\/p>\n<p>Oracle8\u4ee5\u5f8c<\/p>\n<p>ALTER SYSTEM DUMP DATAFILE file# BLOCK block#;<\/p>\n<p>ALTER SYSTEM DUMP DATAFILE file#<\/p>\n<p>BLOCK MIN minimum_block#<\/p>\n<p>BLOCK MAX maximum_block#;<\/p>\n<p>2).Tree Dump<\/p>\n<p>ALTER SESSION SET EVENTS \u2018immediate trace name treedump level n\u2019;<\/p>\n<p>n\u70baobject_id<\/p>\n<p>3).Undo Segment Header<\/p>\n<p>ALTER SYSTEM DUMP UNDO_HEADER \u2019segment_name\u2019;<\/p>\n<p>4).Undo for a Transaction<\/p>\n<p>ALTER SYSTEM DUMP UNDO BLOCK \u2019segment_name\u2019 XID xidusn xidslot xidsqn;<\/p>\n<p>5).File Header<\/p>\n<p>ALTER SESSION SET EVENTS \u2018immediate trace name file_hdrs level n\u2019;<\/p>\n<p>1 \u63a7\u5236\u6587\u4ef6\u4e2d\u7684\u6587\u4ef6\u982d\u4fe1\u606f<\/p>\n<p>2 level 1 + \u6587\u4ef6\u982d\u4fe1\u606f<\/p>\n<p>3 level 2 + \u6578\u64da\u6587\u4ef6\u982d\u4fe1\u606f<\/p>\n<p>10 level 3<\/p>\n<p>6).Control file<\/p>\n<p>ALTER SESSION SET EVENTS \u2018immediate trace name controlf level n\u2019;<\/p>\n<p>1 \u6587\u4ef6\u982d\u4fe1\u606f<\/p>\n<p>2 level 1 + \u6578\u64da\u5eab\u4fe1\u606f + \u6aa2\u67e5\u9ede\u4fe1\u606f<\/p>\n<p>3 level 2 + \u53ef\u91cd\u7528\u7bc0\u4fe1\u606f<\/p>\n<p>10 level 3<\/p>\n<p>7).Redo log Header<\/p>\n<p>ALTER SESSION SET EVENTS \u2018immediate trace name redohdr level n\u2019;<\/p>\n<p>1 \u63a7\u5236\u6587\u4ef6\u4e2d\u7684redo log\u4fe1\u606f<\/p>\n<p>2 level 1 + \u6587\u4ef6\u982d\u4fe1\u606f<\/p>\n<p>3 level 2 + \u65e5\u8a8c\u6587\u4ef6\u982d\u4fe1\u606f<\/p>\n<p>10 level 3<\/p>\n<p>8).Redo log<\/p>\n<p>ALTER SYSTEM DUMP LOGFILE \u2018FileName\u2019;<\/p>\n<p>ALTER SYSTEM DUMP LOGFILE \u2018FileName\u2019<\/p>\n<p>SCN MIN MinimumSCN<\/p>\n<p>SCN MAX MaximumSCN<\/p>\n<p>TIME MIN MinimumTime<\/p>\n<p>TIME MAX MaximumTime<\/p>\n<p>LAYER Layer<\/p>\n<p>OPCODE Opcode<\/p>\n<p>DBA MIN FileNumber . BlockNumber<\/p>\n<p>DBA MAX FileNumber . BlockNumber<\/p>\n<p>RBA MIN LogFileSequenceNumber . BlockNumber<\/p>\n<p>RBA MAX LogFileSequenceNumber . BlockNumber;<\/p>\n<p>\u5176\u4e2dtime = (((((yyyy \u2013 1988)) * 12 + mm \u2013 1) * 31 + dd \u2013 1) * 24 + hh) * 60 + mi) * 60<\/p>\n<p>+ ss;<\/p>\n<p>9).Loghist<\/p>\n<p>ALTER SESSION SET EVENTS \u2018immediate trace name loghist level n\u2019;<\/p>\n<p>1 dump\u63a7\u5236\u6587\u4ef6\u4e2d\u6700\u65e9\u548c\u6700\u9072\u7684\u65e5\u8a8c\u6b77\u53f2\u9805<\/p>\n<p>1 dump 2^n\u500b\u65e5\u8a8c\u6b77\u53f2\u9805<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u58f9.Memory Dumps 1).Global Area ALTER SESSION SET EVENTS \u2018immediate trace name global_area level n\u2019; 1 \u5305\u542bPGA 2 \u5305\u542bSGA 4 \u5305\u542bUGA 8 \u5305\u542bindrect memory 2).Library Cache ALTER SESSION SET EVENTS \u2018immediate trace name library_cache level n\u2019; 1 library cache\u7d71\u8a08\u4fe1\u606f 2 \u5305\u542bhash table histogram 3 \u5305\u542bobject handle 4 \u5305\u542bobject\u7d50\u69cb\uff08Heap 0\uff09 3).Row Cache ALTER SESSION SET EVENTS \u2018immediate [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-2439","post","type-post","status-publish","format-standard","hentry","category-oracle"],"_links":{"self":[{"href":"https:\/\/www.killtest.com.tw\/index.php?rest_route=\/wp\/v2\/posts\/2439","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.killtest.com.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.killtest.com.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.killtest.com.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.killtest.com.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2439"}],"version-history":[{"count":1,"href":"https:\/\/www.killtest.com.tw\/index.php?rest_route=\/wp\/v2\/posts\/2439\/revisions"}],"predecessor-version":[{"id":2440,"href":"https:\/\/www.killtest.com.tw\/index.php?rest_route=\/wp\/v2\/posts\/2439\/revisions\/2440"}],"wp:attachment":[{"href":"https:\/\/www.killtest.com.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2439"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.killtest.com.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2439"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.killtest.com.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}