trcsess

This is a short note about trcsess. Basically used to combine multiple trace files into one using different criteria.


trcsess [output=<output file name >] [session=<session ID>] [clientid=<clientid>] [service=<service name>] [action=<action name>] [module=<module name>] <trace file names>

output=<output file name> output destination default being standard output.
session=<session Id> session to be traced.
Session id is a combination of session Index & session serial number e.g. 8.13.
clientid=<clientid> clientid to be traced.
service=<service name> service to be traced.
action=<action name> action to be traced.
module=<module name> module to be traced.
<trace_file_names> Space separated list of trace files with wild card '*' supported.

So, it clearly says that it can support separated list of trace file, but what if you want to combine using multiple service or action etc. I got one situation yesterday that some calls from application are coming from one service and that call end using some other service. Without combining this two trace file it was not possible to get whole picture. For example


*** 2012-07-17 17:07:30.379
*** SESSION ID:(XXX.XXXXX) 2012-07-17 17:07:30.379
*** CLIENT ID:() 2012-07-17 17:07:30.379
*** SERVICE NAME:(DATA_SERVICE) 2012-07-17 17:07:30.379
*** MODULE NAME:(YYYYY.exe) 2012-07-17 17:07:30.379
*** ACTION NAME:() 2012-07-17 17:07:30.379

*** 2012-07-17 16:33:07.734
*** SESSION ID:(XXX.XXXXX) 2012-07-17 16:33:07.734
*** CLIENT ID:() 2012-07-17 16:33:07.734
*** SERVICE NAME:(WEB_SERVICE) 2012-07-17 16:33:07.734
*** MODULE NAME:(ZZZZZ.exe) 2012-07-17 16:33:07.734
*** ACTION NAME:() 2012-07-17 16:33:07.734

I don’t know if there is some other way but what i did was

sed -i ‘s/ACTION NAME:()/ACTION NAME:(TARAL)/g’ *.trc

Then combine using action


*** 2012-07-17 17:07:30.379
*** SESSION ID:(XXX.XXXXX) 2012-07-17 17:07:30.379
*** CLIENT ID:() 2012-07-17 17:07:30.379
*** SERVICE NAME:(DATA_SERVICE) 2012-07-17 17:07:30.379
*** MODULE NAME:(YYYYY.exe) 2012-07-17 17:07:30.379
*** ACTION NAME:(TARAL) 2012-07-17 17:07:30.379

*** 2012-07-17 16:33:07.734
*** SESSION ID:(XXX.XXXXX) 2012-07-17 16:33:07.734
*** CLIENT ID:() 2012-07-17 16:33:07.734
*** SERVICE NAME:(WEB_SERVICE) 2012-07-17 16:33:07.734
*** MODULE NAME:(ZZZZZ.exe) 2012-07-17 16:33:07.734
*** ACTION NAME:(TARAL) 2012-07-17 16:33:07.734
Advertisements

ORA-00600 [kksgaGetNoAlloc_Int0]

We received this error for Interval/List partition. Here is the sample test case


drop table part_test purge;
CREATE TABLE PART_TEST (
 ID NUMBER,ST_CODE VARCHAR2(1),ST_DESC VARCHAR2(4000),
 CR_DATE date, INFO VARCHAR2(200)
 ) partition by range(ID) interval(1)
 SUBPARTITION BY LIST(ST_CODE)
 SUBPARTITION TEMPLATE
 (SUBPARTITION ST_CODE_a VALUES ('A'),
 SUBPARTITION ST_CODE_s VALUES ('S'),
 SUBPARTITION ST_CODE_v VALUES ('V'),
 SUBPARTITION ST_CODE_e VALUES ('E'),
 SUBPARTITION ST_CODE_oth VALUES (DEFAULT))
 (partition ID_1 values less than (111000));

TARAL.ORALINUX>select * from part_test where id=321000 and st_code='A';
select * from part_test where id=321000 and st_code='A'
 *
ERROR at line 1:
ORA-00600: internal error code, arguments: [kksgaGetNoAlloc_Int0], [1050005], [1048575], [], [], [], [], [], [], [], [], []

Now getting into details found that 1048575 number in that error is nothing but MAX number of allowed partitions in oracle. By the way test was done in 11.2.0.3. So, when we start partition with 111000 and add any partition it should consider one 1 list and 5 sub-partition. But, it’s considering a lot’s more and actually it’s a BUG. It calculate holes in that partition and not the  actual partitions. Here is little more details about that first argument in that error.


TARAL.ORALINUX>select ((321000-111000)*5)+5 from dual;

((321000-111000)*5)+5
---------------------
 1050005

So, it’s calculated partition value and which exceeds partition limit. That means it won’t track lowest created partition.

</pre>
TARAL.ORALINUX>select (1048570/5) + 111000 from dual;

(1048570/5)+111000
------------------
 320714

1 row selected.

TARAL.ORALINUX>select * from part_test where id=320714 and st_code='A';
select * from part_test where id=320714 and st_code='A'
 *
ERROR at line 1:
ORA-00600: internal error code, arguments: [kksgaGetNoAlloc_Int0], [1048575], [1048575], [], [], [], [], [], [], [], [], []

TARAL.ORALINUX>select * from part_test where id=320713 and st_code='A';

no rows selected
<pre>

By the way this is coming from CURSOR compilation itself i believe but not sure.  And here is the BUG

Bug 13722697  ORA-600 [kksgaGetNoAlloc_Int0] on select against composite interval partitioned table