Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PL/SQL compilation fails with no error message

Tags:

oracle

plsql

My installation of APEX has come pear shaped on a Oracle 9.2.0.5.0 instance, all the packages are invalid.

I've tried recompiling everything with DBMS_UTILITY.compile_schema, but still all the packages are invalid. So, tried recompiling individual packages,

SQL> ALTER PACKAGE FLOWS_020000.WWV_FLOW_QUERY COMPILE BODY;

Warning: Package Body altered with compilation errors.

SQL> show err
No errors.
SQL> 
SQL> ALTER PACKAGE FLOWS_020000.WWV_FLOW_QUERY COMPILE;

Warning: Package altered with compilation errors.

SQL> show err
No errors.
SQL> 

nothing in the alter log for it..

How can I find what the error is? shouldn't "show err" give it to me?

like image 301
Matthew Watson Avatar asked Nov 12 '08 04:11

Matthew Watson


People also ask

How do I check my PL SQL compilation errors?

After you use the CREATE command to create a stored procedure, a message is displayed if the stored procedure has any compilation errors. To see the errors, you use SHOW ERRORS. When you specify SHOW ERRORS with no arguments, SQL*Plus shows compilation errors for the most recently created or altered stored procedure.

What is PL SQL compilation error?

The state in which a PL/SQL program fails to propagate through its intended flow of execution is called as an error. There are two types of errors in Oracle PL/SQL. They are compilation errors and run time errors (also called as Exceptions) which are explained below in detail.

How do I find the compilation error in SQL Developer?

control-shift-L should open the log(s) for you. this will by default be the messages log, but if you create the item that is creating the error the Compiler Log will show up (for me the box shows up in the bottom middle left).

What is the process for PL SQL compilation?

PL/SQL executes in a virtual machine, and it first translates (compiles) your code into virtual machine code, sometimes called bytecode or mcode. This is basically the same model that Java uses. When it is time to actually run your code, however, that bytecode is translated (interpreted) into system calls.


2 Answers

I know this answer is kind of late but just want to let you know that you can also use:

ALTER PACKAGE your_package_name_here COMPILE PACKAGE;

ALTER PACKAGE your_package_name_here COMPILE BODY;

then if warning was shown, you can use the below script to check the error and which lines it resides in:

-- this shows the errors within the package itself

SHOW ERRORS PACKAGE your_package_name_here;

-- this shows the errors within the package body

SHOW ERRORS PACKAGE BODY your_package_name_here;
like image 89
yellowvamp04 Avatar answered Oct 13 '22 15:10

yellowvamp04


Conn as FLOWS_020000 and go:

SELECT *
FROM   ALL_ERRORS
WHERE  OWNER = USER;

Or conn as SYSTEM and go

SELECT *
FROM   ALL_ERRORS
WHERE  OWNER = 'FLOWS_020000';
like image 10
cagcowboy Avatar answered Oct 13 '22 16:10

cagcowboy