How to Debug and Validate Invalid Objects in oracle database?
Anonymous Answered question 26/09/2022
We can validate invalid database objects in oracle database using the following ways.
- Find invalid objects Example:
12345
--To Find the number of invalid objects
SQL>
select
count
(*)
from
dba_objects
where
status=
'INVALID'
;
SQL>
select
owner,object_type,
count
(*)
from
dba_objects
where
status=
'INVALID'
group
by
owner,object_type;
--To identify the object name and their types and owner
SQL>
select
owner, object_name,object_type
from
dba_objects
where
status =
'INVALID'
;
- Manual method of validation. Example:
123456
SQL>
Alter
procedure
<owner>.<procedure_name> compile;
SQL >
Alter
function
<owner>.<function_name> compile;
SQL>
Alter
view
<owner>.<view_name> compile;
SQL>
Alter
package <owner>.<package_name> compile;
SQL>
Alter
package <owner>.<package_name> compile body;
SQL>
Alter
materialized
view
<owner>.<Package_name> Compile;
meda Changed status to publish 26/09/2022