Home » SQL & PL/SQL » SQL & PL/SQL » View Error
View Error [message #297562] Fri, 01 February 2008 06:20 Go to next message
gozuhair
Messages: 206
Registered: January 2008
Senior Member
Dear All

My problem is that I am using view "sl_inv_view" for a long time but now I am trying to access view then sql gives the following error.
SQL> desc sl_inv_view
ERROR:
ORA-24372: invalid object for describe
invalid object for describe

One more thing I had renamed the one table and the view is also using that table but after that error I was rechange the table name of its original name but the problem is still there.I dont have query of creating that view.

Please suggest me what can i do.

Regards

Zuhair
Re: View Error [message #297566 is a reply to message #297562] Fri, 01 February 2008 06:35 Go to previous message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Oracle
ORA-24372: invalid object for describe

Cause: The object to be described is not valid. It either has compilation or authorization errors.

Action: The object to be described must be valid.

How exactly did you do that? Here's an example which does NOT do what you've said, so - how did your session differ from this one?
SQL> select * From test;

    AMOUNT F
---------- -
      1000 F
      2000 F
      3000 V
      4000 V
      5000 V

SQL> create view v_test as select * From test;

View created.
Let's rename the table and see what the view has to say about it:
SQL> rename test to test_2;

Table renamed.

SQL> select * From v_test;
select * From v_test
              *
ERROR at line 1:
ORA-04063: view "SCOTT.V_TEST" has errors
Now we'll rename the table back to its original name:
SQL> rename test_2 to test;

Table renamed.

SQL> select * From v_test;

    AMOUNT F
---------- -
      1000 F
      2000 F
      3000 V
      4000 V
      5000 V

SQL>
It seems that the view "works" again.

Also, you might query the 'USER_VIEWS' to find the query which represents that view:
SQL> select text from user_views where view_name = 'V_TEST';

TEXT
-------------------------------------------------------------

select "AMOUNT","FLAG" From test

SQL>

[Updated on: Fri, 01 February 2008 06:35]

Report message to a moderator

Previous Topic: Database connections
Next Topic: PLS-00103 error while running package
Goto Forum:
  


Current Time: Fri Dec 09 19:21:48 CST 2016

Total time taken to generate the page: 0.07524 seconds