Bug #34475 Trying to migrate using mysql migration tool reverse engineering failed
Submitted: 11 Feb 2008 22:26 Modified: 12 Mar 2008 4:17
Reporter: Sam Birtles Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Migration Toolkit Severity:S2 (Serious)
Version:1.1.12 OS:Windows (2000)
Assigned to: CPU Architecture:Any
Tags: Reverse Engineering Failes

[11 Feb 2008 22:26] Sam Birtles
Description:
Hi There, 

I'm trying to migrate a large schema from Oracle.  Firstly i was wondering why it calls DMS_UTILITY.ANALYZE_SCHEMA (?, 'ESTIMATE', 50, 0, 'FOR TABLES') - is there a way of turning this off?

when the execution runs through I get the following:

Initializing JDBC driver ... 
Driver class Oracle Thin JDBC Driver using SID
Opening connection ... 
Connection jdbc:oracle:thin:system/password@host:4403:*****
Initializing JDBC driver ... 
Driver class Oracle Thin JDBC Driver using SID
Opening connection ... 
Connection jdbc:oracle:thin:system/password@host:4403:*****
Getting version information ... 
Initializing JDBC driver ... 
Driver class Oracle Thin JDBC Driver using SID
Build simple Oracle datatypes.
Call Oracle stored procedure ANALYZE_SCHEMA for PM.
CALL DBMS_UTILITY.ANALYZE_SCHEMA(?,  'ESTIMATE', 50, 0, 'FOR TABLE')
The schema could not be reverse engineered (error: 0).
ReverseEngineeringOracle.reverseEngineer :ORA-01502: index 'PM.RRADIUS_NAV_RAD_PK' or partition of such index is in unusable 

state
ORA-06512: at "SYS.DBMS_DDL", line 179
ORA-06512: at "SYS.DBMS_UTILITY", line 331
ORA-06512: at line 1

Details: 
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
oracle.jdbc.driver.T4CTTIoer.processError

(T4CTTIoer.java:331)
oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
oracle.jdbc.driver.T4C8Oall.receive

(T4C8Oall.java:745)
oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:966)
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1170)
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3339)
oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3445)
com.mysql.grt.modules.ReverseEngineeringOracle.reverseEngineer(ReverseEngineeringOracle.java:121)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.mysql.grt.Grt.callModuleFunction(Unknown Source)

How to repeat:
re-run the migration on the particular schema that fails.

Suggested fix:
?
[12 Feb 2008 4:17] Valeriy Kravchuk
Thank you for a problem report. Have you tried to run:

CALL DBMS_UTILITY.ANALYZE_SCHEMA('PM',  'ESTIMATE', 50, 0, 'FOR TABLE');

from Oracle's SQL*Plus? If it still returns error message, maybe something is really wrong with your index?

As for request to NOT run DBMS_UTILITY.ANALYZE_SCHEMA at all, I think it is a reasonable feature request.
[13 Mar 2008 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".