如果数据库是10g及以上版本,可以使用dbms_utility.format_error_backtrace(),这个函数能够返回错误行.
Error Msg :
dbms_utility.format_error_backtrace()
ORA-06512: at "APPS.KOL_OM_INTERFACE_PKG", line 76
---------------------------------------------------------
sqlerrm
ORA-00942: table or view does not exist
---------------------------------------------------------
sqlcode
942
---------------------------------------------------------