Apress.Expert.Oracle.Database.Architecture.9i.and.10g.Programming.Techniques.and.Solutions.Sep.2005

rekharaghuram
from rekharaghuram More from this publisher
05.11.2015 Views

CHAPTER 3 ■ FILES 83 Trace Files Generated in Response to Internal Errors I’d like to close this section with a discussion about those other kinds of trace files—the ones we did not expect that were generated as a result of an ORA-00600 or some other internal error. Is there anything we can do with them? The short answer is that in general, they are not for you and me. They are useful to Oracle Support. However, they can be useful when we are filing an iTAR with Oracle Support. That point is crucial: if you are getting internal errors, then the only way they will ever be corrected is if you file an iTAR. If you just ignore them, they will not get fixed by themselves, except by accident. For example, in Oracle 10g Release 1, if you create the following table and run the query, you may well get an internal error (or not—it was filed as a bug and is corrected in later patch releases): ops$tkyte@ORA10G> create table t ( x int primary key ); Table created. ops$tkyte@ORA10G> insert into t values ( 1 ); 1 row created. ops$tkyte@ORA10G> exec dbms_stats.gather_table_stats( user, 'T' ); PL/SQL procedure successfully completed. ops$tkyte@ORA10G> select count(x) over () 2 from t; from t * ERROR at line 2: ORA-00600: internal error code, arguments: [12410], [], [], [], [], [], [], [] Now, you are the DBA and all of a sudden this trace file pops up in the user dump destination. Or you are the developer and your application raises an ORA-00600 error and you want to find out what happened. There is a lot of information in that trace file (some 35,000 lines more in fact), but in general it is not useful to you and me. We would generally just compress the trace file and upload it as part of our iTAR processing. However, there is some information in there that can help you track down the “who,” “what,” and “where” of the error, and also help you find out if the problem is something others have experienced—many times, the “why”—on http://metalink.oracle.com. A quick inspection of the very top of the trace file will provide you with some useful information, such as Dump file c:\oracle\admin\ora10g\udump\ora10g_ora_1256.trc Sun Jan 02 14:21:29 2005 ORACLE V10.1.0.3.0 - Production vsnsta=0 vsnsql=13 vsnxtr=3 Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production With the Partitioning, OLAP and Data Mining options Windows XP Version V5.1 Service Pack 2 CPU : 1 - type 586 Process Affinity: 0x00000000

84 CHAPTER 3 ■ FILES Memory (A/P) : PH:11M/255M, PG:295M/1002M, VA:1605M/2047M Instance name: ora10g Redo thread mounted by this instance: 1 Oracle process number: 21 Windows thread id: 1256, image: ORACLE.EXE (SHAD) The database information is important to have when you go to http://metalink.oracle. com to file the iTAR, of course, but it is also useful when you go to search http://metalink. oracle.com to see if this is a known problem. In addition, you can see the Oracle instance on which this error occurred. It is quite common to have many instances running concurrently, so isolating the problem to a single instance is useful. *** 2005-01-02 14:21:29.062 *** ACTION NAME:() 2005-01-02 14:21:28.999 *** MODULE NAME:(SQL*Plus) 2005-01-02 14:21:28.999 *** SERVICE NAME:(SYS$USERS) 2005-01-02 14:21:28.999 This part of the trace file is new with Oracle 10g and won’t be there in Oracle9i. It shows the session information available in the columns ACTION and MODULE from V$SESSION. Here we can see that it was a SQL*Plus session that caused the error to be raised (you and your developers can and should set the ACTION and MODULE information; some environments such as Oracle Forms and HTML DB do this already for you). Additionally, we have the SERVICE NAME. This is the actual service name used to connect to the database—SYS$USERS, in this case—indicating we didn’t connect via a TNS service. If we logged in using user/pass@ora10g.localdomain, we might see *** SERVICE NAME:(ora10g) 2005-01-02 15:15:59.041 where ora10g is the service name (not the TNS connect string; rather, it’s the ultimate service registered in a TNS listener to which it connected). This is also useful in tracking down which process/module is affected by this error. Lastly, before we get to the actual error, we can see the session ID and related date/time information (all releases) as further identifying information: *** SESSION ID:(146.2) 2005-01-02 14:21:28.999 Now we are ready to get into the error itself: ksedmp: internal or fatal error ORA-00600: internal error code, arguments: [12410], [], [], [], [], [], [], [] Current SQL statement for this session: select count(x) over () from t ----- Call Stack Trace ----- _ksedmp+524 _ksfdmp.160+14 _kgeriv+139 _kgesiv+78 _ksesic0+59

CHAPTER 3 ■ FILES 83<br />

Trace Files Generated in Response to Internal Errors<br />

I’d like to close this section with a discussion about those other kinds of trace files—the ones<br />

we did not expect that were generated as a result of an ORA-00600 or some other internal<br />

error. Is there anything we can do with them?<br />

The short answer is that in general, they are not for you <strong>and</strong> me. They are useful to <strong>Oracle</strong><br />

Support. However, they can be useful when we are filing an iTAR with <strong>Oracle</strong> Support. That<br />

point is crucial: if you are getting internal errors, then the only way they will ever be corrected<br />

is if you file an iTAR. If you just ignore them, they will not get fixed by themselves, except by<br />

accident.<br />

For example, in <strong>Oracle</strong> 10g Release 1, if you create the following table <strong>and</strong> run the query,<br />

you may well get an internal error (or not—it was filed as a bug <strong>and</strong> is corrected in later patch<br />

releases):<br />

ops$tkyte@ORA10G> create table t ( x int primary key );<br />

Table created.<br />

ops$tkyte@ORA10G> insert into t values ( 1 );<br />

1 row created.<br />

ops$tkyte@ORA10G> exec dbms_stats.gather_table_stats( user, 'T' );<br />

PL/SQL procedure successfully completed.<br />

ops$tkyte@ORA10G> select count(x) over ()<br />

2 from t;<br />

from t<br />

*<br />

ERROR at line 2:<br />

ORA-00600: internal error code, arguments: [12410], [], [], [], [], [], [], []<br />

Now, you are the DBA <strong>and</strong> all of a sudden this trace file pops up in the user dump destination.<br />

Or you are the developer <strong>and</strong> your application raises an ORA-00600 error <strong>and</strong> you want<br />

to find out what happened. There is a lot of information in that trace file (some 35,000 lines<br />

more in fact), but in general it is not useful to you <strong>and</strong> me. We would generally just compress<br />

the trace file <strong>and</strong> upload it as part of our iTAR processing.<br />

However, there is some information in there that can help you track down the “who,”<br />

“what,” <strong>and</strong> “where” of the error, <strong>and</strong> also help you find out if the problem is something others<br />

have experienced—many times, the “why”—on http://metalink.oracle.com. A quick inspection<br />

of the very top of the trace file will provide you with some useful information, such as<br />

Dump file c:\oracle\admin\ora10g\udump\ora10g_ora_1256.trc<br />

Sun Jan 02 14:21:29 2005<br />

ORACLE V10.1.0.3.0 - Production vsnsta=0<br />

vsnsql=13 vsnxtr=3<br />

<strong>Oracle</strong> <strong>Database</strong> 10g Enterprise Edition Release 10.1.0.3.0 - Production<br />

With the Partitioning, OLAP <strong>and</strong> Data Mining options<br />

Windows XP Version V5.1 Service Pack 2<br />

CPU : 1 - type 586<br />

Process Affinity: 0x00000000

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!