Re: Re-compile invalid objects in oracle9i

Re: Re-compile invalid objects in oracle9i

 

  

Hi Amit,

That's because you have blank line in between the statement itself. Try
this:
select 'ALTER ' || OBJECT_TYPE || ' ' ||
OWNER || '.' || OBJECT_NAME || ' COMPILE;'
from
all_objects
where
status = 'INVALID'
and
object_type in ('PACKAGE','FUNCTION','PROCEDURE')
;

Regards,
Pauline





oracledba-ezmlmshield-x50703602.[Email address protected]
2008/02/28 07:36 AM

To
[Email address protected]
cc

Subject
Re-compile invalid objects in oracle9i






Dear All,

I have to alter a table in production database. Then associated objects
become invalid. So I want to rebuild by using below script:

spool on

Spool D:\amit\CalendarRegistration\ForRelease\SpoolText.txt

select

'ALTER ' || OBJECT_TYPE || ' ' ||

OWNER || '.' || OBJECT_NAME || ' COMPILE;'

from

all_objects

where

status = 'INVALID'

and

object_type in ('PACKAGE','FUNCTION','PROCEDURE')

;


but it is giving error like
SP2-0734: unknown command beginning "'ALTER ' |..." - rest of line
ignored.
SP2-0734: unknown command beginning "OWNER || '..." - rest of line
ignored.
SP2-0042: unknown command "from" - rest of line ignored.
SP2-0734: unknown command beginning "all_object..." - rest of line
ignored.
SP2-0044: For a list of known commands enter HELP
and to leave enter EXIT.
SP2-0042: unknown command "where" - rest of line ignored.
SP2-0734: unknown command beginning "status = '..." - rest of line
ignored.
SP2-0042: unknown command "and" - rest of line ignored.
SP2-0734: unknown command beginning "object_typ..." - rest of line
ignored.
SP2-0044: For a list of known commands enter HELP
and to leave enter EXIT.



Please help me on this issue.

Thanks,
Amit



This e-mail is confidential and may be legally privileged. If you are not
the intended recipient, please notify the sender immediately and delete
this e-mail.

?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????


---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html





If you are not the intended addressee, please inform us immediately that you have received this e-mail in error, and delete it. We thank you for your cooperation.
Oracle LazyDBA home page