apparently, pls-00801: internal error [phdcsql_print_kge_errors::parm pos] is one of the most annoying oracle errors. off course, phdcsql_print_kge_errors::parm pos is just an example that can be replcaed with any other undecipherable set characters.
Oracle’s official error description is:
Cause: This is a generic internal error that might occur during compilation or execution. The first parameter is the internal error number.
Action: Report this error as a bug to your Customer Support representative.
While it might be very tempting to contact Oracle Support, many users will prefer to try and solve the problem without opening a service request and waiting for an answer.
Basically, what this error means is that there is a problem with this query but Oracle is having problem describing the error. The result is a generic (and not really helpful ) error message.
Like any generic error description, many reasons can cause the problem. The only solution is trying to identify the problem yourself by trial and error.
Copy the query part of the code to a separate window and try to tweak it without changing the basics: change tables order, change aliases names, comment what you can or run it without variables. Even if this will not solve the problem, sometimes this can provide a more informative error message.
Using this method I have found several issues that caused pls-00801 internal error. I am writing a few in order to provide some list of things that can cause this error:
1) The query used a remote database using a db link and the database link user did not have proper permissions.
2) Extra not visible control characters that were added to the code during a problematic copy-paste from the web or from Word.
3) Extra characters that might have different meaning in oracle like:&,”,_ etc.
4) Extra spaces
5) Invalid objects on remote database
6) Several known Oracle bugs (search metalink for the error)
7) An error on a remote database can not be displayed.
8) Your entry here …
Of course, there are countless other reasons for pls-00801. If you encounter any other reason please share it in the comments to help others.
In my case, I was getting this error because by mistake, I was using SQL%ROWCOUNT() in place of SQL%ROWCOUNT.
How I figured it out? I just commented complete code and then kept uncommenting few lines of code at a time, untill I got this cmopilation error. Then I noticed this issue and after that I didn’t face this error.
Regards,
Sachin
Just ran into this error , one that I do not remember seeing in my 20 yrs as oracle developer. Fortunately I have been using subversion and I was able to compare the bad code against a recent earlier version that did not have the error. In my case I had some poor copy pasting and inadvertently I had this garbage line in a place where I only meant to initialize a variable to NULL:
vRti_PoNum := NULL; rcv_transactions_interface.document_num%TYPE;
It is obvious looking at it that the above is erroneous, but with a generic error such as PLS-801 oracle compiler doesn’t direct me to the section of code that actually was in error making it a little difficult to find.