>ORACLE invalid objects

>invalid obje daha önce compile edilmemiş obje manasındadır. siz ne zaman o sql çalıştırırsanız validr duruma geçecektir.
invalid object list;
break on c1 skip 2

set pages 999

col c1 heading ‘owner’ format a15
col c2 heading ‘name’ format a40
col c3 heading ‘type’ format a10

ttitle ‘Invalid|Objects’

select
owner c1,
object_type c3,
object_name c2
from
dba_objects
where
status != ‘VALID’
order by
owner,
object_type
;
—————————————-
You can invoke the utl_recomp package to recompile invalid objects:

EXEC UTL_RECOMP.recomp_serial(‘schema name’);

Oracle highly recommends running this script towards the end of of any migration/upgrade/downgrade.

Set heading off;

set feedback off;

set echo off;

Set lines 999;

Spool run_invalid.sql

select

‘ALTER ‘ || OBJECT_TYPE || ‘ ‘ ||

OWNER || ‘.’ || OBJECT_NAME || ‘ COMPILE;’

from

dba_objects

where

status = ‘INVALID’

and

object_type in (‘PACKAGE’,’FUNCTION’,’PROCEDURE’)

;

spool off;

set heading on;

set feedback on;

set echo on;

@run_invalid.sql
———————-

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s