Invalid check in database and complie.
====================================
Invalid check in database
====================================
COLUMN object_name FORMAT A30
SELECT owner,
object_type,
object_name,
status
FROM dba_objects
WHERE status = 'INVALID'
ORDER BY owner, object_type, object_name;
=============Invalid under schema level-=============
SELECT COUNT(*) FROM dba_objects WHERE owner = 'Schema_name' AND status <>'VALID';
====================================
To compile all run utlrp in db level.
====================================
@?/rdbms/admin/utlrp.sql
======================================================
for only invalid compile spool in script and run for invalids
======================================================
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
===================================
Invalid check in database
====================================
COLUMN object_name FORMAT A30
SELECT owner,
object_type,
object_name,
status
FROM dba_objects
WHERE status = 'INVALID'
ORDER BY owner, object_type, object_name;
=============Invalid under schema level-=============
SELECT COUNT(*) FROM dba_objects WHERE owner = 'Schema_name' AND status <>'VALID';
====================================
To compile all run utlrp in db level.
====================================
@?/rdbms/admin/utlrp.sql
======================================================
for only invalid compile spool in script and run for invalids
======================================================
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
===================================
Comments
Post a Comment