ORA-06512 网上最容易查到的解释为
Cause
This error is caused by the stack being unwound by unhandled exceptions in your PLSQL code.
The options to resolve this Oracle error are:
- Fix the condition that is causing the unhandled error.
- Write anexception handlerfor this unhandled error.
- Contact your DBA for help.
The ORA-06512 error message indicates the line number of the unhandled error in the PLSQL code. This is quite useful when troubleshooting.
举个栗子来了解此异常
创建存储过程TestProc,参数v_number是一个长度为2的数字, 存储过程中将100赋值给v_number,执行存储过程后提示异常,ORA-06502表示发生的错误;ORA-06512表示发生的行数,本例中因为100的是3位数字,v_number只能处理2位数字
SQL> CREATE OR REPLACE PROCEDURE TestProc AS
2 v_number number(2);
3 BEGIN
4 v_n