Put your tips and tricks online - Share your knowledge! Login | Register
 
 
  Search     Advanced search
 

Home | Ask Question | Add tip | My tips | Recent tips & tricks | Suggest a category | FAQ | Forums

 
 
 
 Category : Home > Databases > Oracle > Performance Tuning     

How to ANALYZE partitioned tables with VALIDATE STRUCTURE


If you got the error:

ORA-14508: specified VALIDATE INTO table not found

This may be because you are trying to analyze a partitioned table and INVALID_ROWS table is
not found in the current schema.

To validate structure (checks objects for logical corruption) for partitioned tables you
first need to ensure that you’ve got INVALID_ROWS table in your database, if you don’t you
can create it:

cd ${ORACLE_HOME}/rdbms/admin
sqlplus / @utlvalid.sql

This will create the table in OPS$ORACLE schema (if you have that user of course, if you
don't create it in different schema)

You can then run validate structure for a table i.e.

SQL> analyze table scott.orders validate structure into ops$oracle.invalid_rows;

To generate an analyze script for partitioned tables in SYS schema (may be required for
Oracle upgrade) use the script below:

$ sqlplus '/as sysdba'
set verify off
set space 0
set heading off
set feedback off       
set pages 1000
set linesize 150   
spool analyze_part.sql       
select 'analyze table ' || table_name || ' validate structure into ops$oracle.invalid_rows;'
from dba_tables 
where owner = 'SYS' 
and partitioned = 'YES';
spool off



  Options
 
   del.icio.us  |  newsvine  |  digg  |  furl  |  google  |  yahoo  |  Ma.gnolia  |  vigillar  |  reddit  |  technorati  |  icerocket  |  pubsub

       Rate this tip:    

Start discussion or add comment to this tip

  Details
Tip reference : #157
views : 2487
Added on : 01/24/07
Submited by : h8dk97
 
Send a message Send a message Printer friendly output Printer friendly output
Display this member's tips Display this member's tips (161)
 
 
<< Previous Next >>
 Most viewed tips 
  Databases > Oracle > Security : How to unlock Oracle user account  
  Operating Systems > Unix : How to kill Unix user session  
  Databases > Oracle > Performance Tuning : How to enable trace in Oracle  
  Databases > Oracle : Kill user session  
   
  All categories
Databases | Programming | Hardware | Operating Systems | Networking | Internet | ERP / CRM | Games & Multimedia | Graphics & Design | Miscellaneous | Office Software | TipLib FAQ
 
 

Home |  FAQ |  Terms of Use |  Privacy Policy

© 2005 tiplib.com