Search This Blog

Total Pageviews

Wednesday, 8 January 2025

ANALYZE PARTITION TABLE VALIDATE STRUCTURE CASCADE

ANALYZE PARTITION TABLE VALIDATE STRUCTURE CASCADE Script




	ORA-14508: ANALYZE PARTITION TABLE VALIDATE STRUCTURE CASCADE (Doc ID 111990.1)
    
    

 set linesize 300 pagesize 300
 col xx for a100
 select 'Prompt '||TABLE_OWNER||'.'||TABLE_NAME||'.'||PARTITION_NAME dba_TAB_PARTITIONS  FROM dba_TAB_PARTITIONS WHERE TABLE_NAME ='XXXX';
 
 
 set pagesize 0 
 -- spool p.sql 
 select 'Prompt '||TABLE_OWNER||'.'||TABLE_NAME||'.'||PARTITION_NAME  || chr(10) ||'analyze table ' ||TABLE_OWNER||'.'||TABLE_NAME || ' partition (' ||PARTITION_NAME ||') validate structure cascade online into invalid_rows;'  || chr(10) || ' select count(*) from invalid_rows ;'
 FROM dba_TAB_PARTITIONS 
 WHERE TABLE_NAME ='XXX';
 
 -- spool off 
 
 

No comments:

Oracle DBA

anuj blog Archive