EXP-00097: Object type "string"."string" is not in a valid
state, type will not be exported

Answer Posted / mayur vora

1. Run following query:

select
'ALTER ' || OBJECT_TYPE || ' ' ||
OWNER || '.' || OBJECT_NAME || ' COMPILE;'
from
dba_objects
where
status = 'INVALID'
and
object_type in ('PACKAGE','FUNCTION','PROCEDURE','TABLE')



2. Now follow below block.

declare
cursor myCursor is select object_type, object_name
from SYS.USER_OBJECTS where status = 'INVALID'
order by 1, 2;
sqlString varchar2(100);
begin
for r1 in myCursor loop
begin
if r1.object_type = 'PACKAGE BODY' then
sqlString := 'alter PACKAGE '||r1.object_name||'
compile BODY';
elsif r1.object_type = 'TYPE BODY' then
sqlString := 'alter TYPE '||r1.object_name||'
compile BODY';
else
sqlString := 'alter '||r1.object_type||'
'||r1.object_name||' compile';
end if;
execute immediate sqlString;
dbms_output.put_line(r1.object_type||'
'||r1.object_name||' compiled successfully');
exception
when OTHERS then
dbms_output.put_line(SQLERRM||' on '||sqlString);
end;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

ORA-26029: index string.string partition string initially in unusable state

1717


ORA-26079: file "string" is not part of table string.string

1526


IMP-00060: Warning: Skipping table "string"."string" because object type "string"."string" does not exist or has different identifier

2626


ORA-26028: index string.string initially in unusable state

3407


ORA-26084: direct path context already finished

1488






IMG-02003: 2FF03 - incorrect color histogram feature specification

1203


when i ran any workflow or session, getting below error: seesion task instance[s_xxx]: Execution terminated unexpecterdly

1756


In my project I am using star schema and only diimension tables are loaded and not fact tables any one can help me why it is happening? Plase guide me.

2333


[ERROR] [main 11:01:20] (JCLLoggerAdapter.java:error:454) Unsuccessful: alter table user.CEN_USER_MASTER add constraint FKF4EDEDC3D0BAAE75 foreign key (ROLE_ID) references user.CEN_ROLE_MASTER [ERROR] [main 11:01:20] (JCLLoggerAdapter.java:error:454) ORA-02275: such a referential constraint already exists in the table

2292


How to resolve QSM-01108 error. I have no OR conditions in my query, but do have 9 IN conditions. The error says the max limit is 2 while I have 257 number of disjuncts. However, if I remove even a single IN condition, the query is rewritten. I cannot change my query. How can I resolve this issue?

2317


Hi guys, I have four tables those are emp,dept,eliminate and uneliminate. i wrote small cursor..when i run, it display one error (ORA-01403 nodata found)... The query is: Declare cursor c1 is select e.ename emp_name from emp e,dept d where e.deptno=d.deptno group by deptno; r1 c1%rowtype; test_emp varchar2(200); begin for r1 in c1 loop begin select eliminate_emp into test_emp from eliminate t,uneliminate ut where t.number=ut.number and t.deptno=e.deptno and rownum<1; end; dbms_output.put_line(r1.emp_name); end loop; end; Thanks...

2263


invalid quantity specification negative quantity are not allowed for this item please check this item definition quantity

2862


NZE-28890: Entrust Login Failed

1414


IMP-00070: Lob definitions in dump file are inconsistent with database.

1293


RMAN-05017: no copy of datafile number found to recover

1889