watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=

watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=


Q           The title is as follows :

stay Oracle in , how dump Control documents ?


     
A           The answer is as follows :          


The order is :alter system set events 'immediate trace name controlf level 12';

The file path is :

SELECT d.value || '/' || lower(rtrim(i.instance, chr(0))) || '_ora_' ||p.spid || '.trc' trace_file_name

  FROM (SELECT p.spid

          FROM v$mystat m, v$session s, v$process p

         WHERE m.statistic# = '1'

           AND s.sid = m.sid

           AND p.addr = s.paddr) p,

       (SELECT t.instance

          FROM v$thread t, v$parameter v

         WHERE v.name = 'thread'

           AND (v.value = '0' OR to_char(t.thread#) = v.VALUE)) i,

       (SELECT VALUE FROM v$parameter WHERE NAME = 'user_dump_dest') d;

You can also use oradebug:

oradebug setmypid

oradebug dump controlf 12;

oradebug tracefile_name