Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Analyze question - data corruption
In article <20000327141226.01940.00009253_at_ng-dc1.aol.com>,
mannymac_at_aol.com (MannyMac) wrote:
> Hello
>
> I am new to oracle and I am trying to check for data block corruption,
our
> software vendor suggests to use analyze in the following format:
>
> analyze table (table name) validate structure cascade:
>
> so I am trying to put a script together to check for all the tables on
the
> database, my questions are as follows:
>
> 1. I am assuming that oracle has to be up, but does the system has to
be
> cleared of users?? or this can be done while the dataabase is up and
being used
> by people during the day?
>
> 2. running select * from dba_tables gives me more than 2,600 tables
owned by 7
> accounts. Instead of doing the analyze one by one, is there a more
efficient
> way of checking all these tables? I know there is a
dbms_utility.analyze_schema
> to analyze objects by user, but I am not quite sure how to use it. The
> dbmsutil.sql doesn't seem to help me much.
>
> any help will be greatly appretiated
> Manny
> chavez_at_dkfny.com
>
>
set heading off
Spool analyze.sql
select 'analyze table' || owner || '.' || table_name || 'validate
structure cascade:' where owner not in ('SYS','SYSTEM');
spool off
sqlplus uid/pwd_at_svc @analyze.sql
enjoy.......
-- Doug Coan Oracle Certified Professional DBA Sent via Deja.com http://www.deja.com/ Before you buy.Received on Mon Mar 27 2000 - 00:00:00 CST