6 Replies Latest reply: Dec 2, 2009 2:52 PM by Timur Akhmadeev RSS

    tkprof

    Yoav
      Hi,
      I have 10 udump trace files generated by batch that run in 10 process.
      I would like to merge them into one tkprof file.
      Is it possible ?
      Thnaks
        • 1. Re: tkprof
          Anurag Tibrewal
          Hi,

          I doubt tkprof provides the ability to produce one file for many trace files.

          But you can merge your multiple trace file into single trace file (in unix command "cat" is used to merge). Then you can use tkprof on this to produce single output file.

          Regards
          Anurag
          • 2. Re: tkprof
            289595
            you can use trcsess ( 10g utility) on all the trace files and then run tkprof on the output file.

            Alternativley, you can read the following:

            http://blogs.sun.com/LetTheSunShineIn/entry/oracle_tkprof_utility_can_read
            • 3. Re: tkprof
              Yoav
              Hi SKU.
              It was very helpful.
              Yet i still have a problem.
              Each and evey trace file have the follwoing information in its header :
              /software/oracle/admin/xxxx/udump/xxx_ora_4084_Monthly_Inv.trc
              Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
              With the Partitioning, OLAP, Data Mining and Real Application Testing options
              ORACLE_HOME = /software/oracle/xxxxxxxxx
              System name:    HP-UX
              Node name:      pulse
              Release:        B.11.23
              Version:        U
              Machine:        ia64
              Instance name: xxxxx
              Redo thread mounted by this instance: 1
              Oracle process number: 26
              Unix process pid: 4084, image: oracle@pulse
              
              *** ACTION NAME:() 2009-12-02 11:27:36.880
              *** MODULE NAME:(sqr@pulse (TNS V1-V3)) 2009-12-02 11:27:36.880
              *** SERVICE NAME:(SYS$USERS) 2009-12-02 11:27:36.880
              When i am trying to run the following statment i am getting a zero bytes file:
              trcsess output=NEWInv.trc module=sqr
              trcsess output=NEWInv.trc module=sqr@pulse

              The following statment return with an error:
              trcsess output=NEWInv.trc module=sqr@pulse (TNS V1-V3)
              ksh: syntax error: `(' unexpected

              Thanks Again !
              • 4. Re: tkprof
                289595
                Try using

                trcsess output=NEWInv.trc module=sqr *.trc or
                trcsess output=NEWInv.trc module=sqr@pulse *.trc

                if this makes any difference.
                • 5. Re: tkprof
                  Yoav
                  Nop.
                  Still zero bytes :

                  -rw-r--r-- 1 oracle dba 0 Dec 2 17:05 NEWInv.trc

                  Thanks
                  • 6. Re: tkprof
                    Timur Akhmadeev
                    SQL> exec dbms_application_info.set_module('test module', 'test action')
                    
                    PL/SQL procedure successfully completed.
                    
                    SQL> alter session set sql_trace = true;
                    
                    Session altered.
                    
                    SQL> select * from dual;
                    
                    D
                    -
                    X
                    
                    SQL> alter session set sql_trace = false;
                    
                    Session altered.
                    
                    SQL> select * from v$diag_info where name like '%Trace%';
                    
                       INST_ID NAME
                    ---------- ----------------------------------------------------------------
                    VALUE
                    --------------------------------------------------------------------------------
                             1 Diag Trace
                    /u01/app/oracle/diag/rdbms/test11g2/test11g2/trace
                    
                             1 Default Trace File
                    /u01/app/oracle/diag/rdbms/test11g2/test11g2/trace/test11g2_ora_3417.trc
                    
                    
                    SQL> exit
                    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
                    With the Partitioning option
                    [oracle@localhost trace]$ trcsess output=trcs.txt module='test module' test11g2_ora_3417.trc
                    [oracle@localhost trace]$ ls -l | grep trcs
                    -rw-r--r-- 1 oracle oinstall   1523 Dec  2 23:51 trcs.txt