Home » RDBMS Server » Server Administration » Way to compile invalid objects (9.2.0.8.0, 8.1.7.4.0, 10.2.0.4.0 , SunOS )
Way to compile invalid objects [message #541193] Sun, 29 January 2012 09:36 Go to next message
Jack14
Messages: 497
Registered: December 2011
Location: INDIA
Senior Member
Hi,

I see lot of invalid objects in my databases especially owned by user PUBLIC,SYS and SYSTEM.

In this case what should my approach?I mean how to compile invalid objects.

I am confuse as to which way to compile invalid objects from the list below.

1.rerun catalog.sql and catproc.sql

2.Login as sysdba and run the script run utlrp.sql script from $ORACLE_HOME/rdbms/admin

SQL>@?/rdbms/admin/utlrp.sql

3.Login as sysdba and run the script

exec dbms_utility.compile_schema('XXXXX')

4.Compile invalid objects individually.

alter package pkname compile

Please suggest me the right way to compile invalid objects.

Thank you
Re: Way to compile invalid objects [message #541194 is a reply to message #541193] Sun, 29 January 2012 09:40 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
what needs to be done depends upon who owns the object & why they are not VALID.

 1  select owner, count(*) from dba_objects where status != 'VALID'
  2* group by owner order by 1
SQL> /

OWNER				 COUNT(*)
------------------------------ ----------
DBADMIN 				7
HR					4
SCOTT					1
SYS					1
USER1				       27
USER2					2
Re: Way to compile invalid objects [message #541195 is a reply to message #541194] Sun, 29 January 2012 10:00 Go to previous messageGo to next message
Jack14
Messages: 497
Registered: December 2011
Location: INDIA
Senior Member
Swan,

Quote:
what needs to be done depends upon who owns the object & why they are not VALID.


I see invalid objects owned by schema 'JACK' which is the main schema (we create all
application related objects under this schema) ,PUBLIC,SYS and SYSTEM.

Now please suggest how to compile based on above answer.

Re: Way to compile invalid objects [message #541197 is a reply to message #541195] Sun, 29 January 2012 11:07 Go to previous messageGo to next message
John Watson
Messages: 8960
Registered: January 2010
Location: Global Village
Senior Member
I'ld use utlrp, and then look at any remaining invalid objects individually.
Re: Way to compile invalid objects [message #541201 is a reply to message #541195] Sun, 29 January 2012 12:09 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:
Now please suggest how to compile based on above answer.


Query ALL/DBA_ERRORS to know the errors and fix accordingly.

Regards
Michel
Re: Way to compile invalid objects [message #541212 is a reply to message #541201] Mon, 30 January 2012 00:31 Go to previous message
Jack14
Messages: 497
Registered: December 2011
Location: INDIA
Senior Member

Thank you all for your suggestions.
Previous Topic: asm disgroup filled up
Next Topic: 12560 tns protocol adapter error
Goto Forum:
  


Current Time: Fri Nov 29 04:45:03 CST 2024