Home » RDBMS Server » Server Administration » ORA--1730
ORA--1730 [message #63088] Wed, 08 September 2004 22:08 Go to next message
Sam
Messages: 255
Registered: April 2000
Senior Member
HI All, i have a problem.

HI, i have some invalid objects in my database and i am unable to compile these procedures and views. I am getting ORA-01730 error.
Is this a bug if so is there any work around?

Thanx in advance.

Sam.
Re: ORA--1730 [message #63089 is a reply to message #63088] Wed, 08 September 2004 22:49 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
It is a malformed view definition, the views column list does not correspond with the select statement. Here's a definition of the ORA-1730 error:
C:>java oerr ora 1730
ORA-01730 invalid number of column names specified

*Cause: The number of column names specified in a CREATE VIEW
          statement did not correspond to the number of columns listed in the
          SELECT clause. If column names are specified in a CREATE VIEW
          statement, exactly one name must be specified for each column or
          expression in the SELECT clause.

*Action: Specify one view column name for each column in the SELECT
          clause.
Check the view that is causing this error.

HTH,
MHE
Re: ORA--1730 [message #63106 is a reply to message #63089] Thu, 09 September 2004 12:03 Go to previous messageGo to next message
Sam
Messages: 255
Registered: April 2000
Senior Member
Hi Maaher, thanx for the help. it helped me resolve the invalidity of views. but what abt the invalid procedures, how to trouble shoot them?

Thanx in advance
Sam.
Re: ORA--1730 [message #63111 is a reply to message #63106] Thu, 09 September 2004 22:08 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Try recompiling them one by one. Or, you could do it by batch. Here's a recompilation procedure. If you need a script, copy and paste the next piece of code in a text file, save it as 'recompile.sql' and run it.

----------------------------------------------------------------------

set feedback off
set verify off
set echo off
set pagesize 0
set heading off
spool compile.sql
select 'alter ' ||
decode(object_type, 'PACKAGE BODY', 'package', object_type) ||
' ' ||
object_name||
' compile' ||
decode(object_type, 'PACKAGE BODY', ' body;', ';')
from dba_objects
where status = 'INVALID'
/
spool off
set feedback on
set verify on
set heading on
set pagesize 40
@compile

----------------------------------------------------------------------

HTH,
MHE
Previous Topic: can mysql and Oracl9i coexit on same linux box
Next Topic: Resize Redologs?
Goto Forum:
  


Current Time: Mon Feb 03 05:34:09 CST 2025