0% found this document useful (0 votes)
11 views1 page

Month End PRE

Uploaded by

rahul tambe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views1 page

Month End PRE

Uploaded by

rahul tambe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

spool MONTH_END_MAY2023.

txt

select name,open_mode from v$database;

select count(*) from dba_objects where status<>'VALID';

select owner,OBJECT_TYPE,count(*) from dba_objects where status<>'VALID' group by


owner,OBJECT_TYPE order by 1;

create table MONTH_END_MAY2023 as select * from dba_objects where status='INVALID';

select distinct status from dba_ind_partitions;

select count(*) from dba_objects where status='INVALID';

select OWNER,INDEX_NAME,TABLE_OWNER,TABLE_NAME from dba_indexes where


status='UNUSABLE';

select INDEX_OWNER,INDEX_NAME,PARTITION_NAME from dba_ind_partitions where


STATUS='UNUSABLE';

select 'alter '||object_type ||' '|| owner||'.'||object_name||' compile ;' from


dba_objects where status<>'VALID'
minus
select 'alter '||object_type ||' '|| owner||'.'||object_name||' compile ;'from
MONTH_END_MAY2023;

You might also like