Re: Warning: View altered with compilation errors

From: Mark D Powell <Mark.Powell2_at_hp.com>
Date: Fri, 26 Mar 2010 13:19:03 -0700 (PDT)
Message-ID: <48088270-c943-47a0-baff-f744ccc28b06_at_i25g2000yqm.googlegroups.com>



On Mar 26, 3:14 pm, zigzagdna <zigzag..._at_yahoo.com> wrote:
> I am using 10.2.0.3 on HP UNIX 11i. I got some warning when I  did
> import data pump. But when I tried to start compiling objects, I do
> not see any error messages in show errors, why?
>
> SQL> alter view TW_RPT_4232 compile;
>
> Warning: View altered with compilation errors.
>
> SQL> show errors;
> No errors.
> SQL>
I believe this is expected behavior. Using 9.2.0.6 to test and I can duplicate the results on 10.2.0.3

SQL> create view bad as select * from marktest2;

View created.

SQL> drop table marktest2;

Table dropped.

SQL> alter view bad compile;

Warning: View altered with compilation errors.

SQL> show errors;
No errors.
SQL> select * from dba_errors where name = 'BAD';

OWNER                            BAD                            VIEW
         1          0          0

ORA-00942: table or view does not exist

On the other hand if I do this with stored code: Procedure, Package, or Function I get results: (tested on 10.2.0.3 only)

SQL> create table marktest (fld1 number, fld2 varchar2(10), fld3 date);

Table created.

SQL> create procedure p1 as
  2 v_ctr number;
  3 begin
  4 select count(*) into v_ctr from marktest;   5 end;
  6 /

Procedure created.

SQL> drop table marktest;

Table dropped.

SQL> alter procedure p1 compile;

Warning: Procedure altered with compilation errors.

SQL> show errors
Errors for PROCEDURE P1:

LINE/COL ERROR



4/1      PL/SQL: SQL Statement ignored
4/33     PL/SQL: ORA-00942: table or view does not exist
SQL> HTH -- Mark D Powell -- Received on Fri Mar 26 2010 - 15:19:03 CDT

Original text of this message