Skip to Main Content
  • Questions
  • ORA-20040 after upgrade to database 18c during Pl/Sql executing

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Josef.

Asked: July 04, 2019 - 3:28 pm UTC

Last updated: July 05, 2019 - 6:14 am UTC

Version: 18c

Viewed 1000+ times

You Asked

Oracle database was sucessfully migrated to 18c using expdp/impdp.
Everything is working fine.
But during executing of a few application PL/SQL procedures we get:

Ora-20040 system error
Ora-06512 in ... line ...

Pl/Sql-code was developed in 10g and worked fine till 12.1.
It seems the error is ongoing since 12.2 and/or 18c.

Any idea to fix this error ora-20040?

Thanks in advance.

and Connor said...

Without seeing the code in your PLSQL programs, that's hard to tell :-)

But ORA-20040 (and all errors between 20000 and 20999) are "manual" errors, ie, they are raised explicitly by the application coder, for example:

raise_application_error(-20040,'Something went wrong');


So it definitely seems a code path issue - we need to see the code.

Is this answer out of date? If it is, please let us know via a Comment

More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library