Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle uses errorstack to track tomcat Times wrong ORA-00903 invalid table name what to do

2025-04-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

What the editor wants to share with you this time is how Oracle uses errorstack to track the wrong ORA-00903 invalid table name of the tomcat Times. The article is rich in content, and interested friends can learn about it. I hope you can get something after reading this article.

Phenomenon

The tomcat error log reports ORA-00903: invalid table name intermittently. There is no specific SQL or table name. You need to find out which code has written an invalid table name.

You can track the error SQL through the errorstack provided by ORACLE.

As the production data can not be extracted, the following are test environment test restore production errors.

Introduction to errorstack

Set errorstack to record the sessions, statements, and trace files of each process when a specific ORA error occurs

In the alert log, there is the location of the trace file that records the error records. You can also open errorstack for a separate session to track the error messages of the session. You can use the

The following two methods are enabled:

/ * level 0 dumps only the error stack

/ * level 1 dumps error stack and function call stack

/ * level 2 Level 1 + ProcessState

/ * level 3 Level 2 + Context area (show all cursors, highlight current cursor)

(1) alter session/system

Alter session/system set events' trace name errorstack level 3'

/ * error_number is the number after the ORA error.

(2) oradebug

/ * user with sysdba permission is required to use oradebug

SQL > oradebug setospid/setmypid/setorapid

SQL > oradebug dump errorstack 3

You can check the current errorstack enabled status of the system by the following methods:

SQL > set serveroutput on

SQL > oradebug setmypid

SQL > oradebug eventdump session/system

Tracking

SQL > alter system set events' 903 trace name errorstack level 3'

Alter log:

Tue Jun 09 14:23:44 2020

OS Pid: 10855 executed alter system set events' 903 trace name errorstack level 3'

Tracking result

Alert log information:

Alert log information:

Tue Jun 09 14:28:04 2020

Errors in file / u01/app/oracle/diag/rdbms/honor/honor1/trace/honor1_ora_7205.trc:

ORA-00903: invalid table name

Tue Jun 09 14:28:06 2020

Dumping diagnostic data in directory= [CDMP _ 20200609142806], requested by (instance=1, osid=7205), summary= [abnormal process termination].

View the corresponding trc tracking file:

* 2020-06-09 14 1428 purl 04.303

* SESSION ID: (26.661) 2020-06-09 14 purl 28 purl 04.303

* CLIENT ID: () 2020-06-09 14 purl 2815 04.303

* SERVICE NAME: (honor) 2020-06-09 14 purl 28 purl 04.303

* MODULE NAME: (SQL*Plus) 2020-06-09 14 purl 28 purl 04.303

* ACTION NAME: () 2020-06-09 14 purl 2815 04.303

DbkedDefDump (): Starting a non-incident diagnostic dump (flags=0x0, level=3, mask=0x0)

-Error Stack Dump-

ORA-00903: the King æ.

-Current SQL Statement for this session (sql_id=0vaqwchf1y3fq)-

Insert into null values (1)

Find the specific sql, take it to the developer, modify the relevant logic, and fix the error.

Close errorstack

SQL > alter system set events' 903 trace name errorstack off'

After reading this article about Oracle using errorstack to track the wrong ORA-00903 invalid table name of the tomcat Times, if you think the content of the article is good, you can share it with more people.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 255

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report