On Oracle, the capture-schema utility does not
work if -schemaname is not specified.
The capture-schema utility has the following problems
if the -schemaname option is not specified when capturing
database schema information from the Oracle (R) database:
-
If you attempt to capture all tables (that is, no tables are
explicitly chosen):
bin/capture-schema -dburl jdbc:oracle:thin:@oraserver:1521:ora
-username scott -password tiger -driver oracle.jdbc.driver.OracleDriver -out
test.dbschema
You will receive:java.sql.SQLExceptions ORA-00942:
table or view does not exist.
The resulting output file is broken.
-
If one or more tables are specified with the -table option:
bin/capture-schema -dburl jdbc:oracle:thin:@oraserver:1521:ora
-username scott -password tiger -driver oracle.jdbc.driver.OracleDriver -table
DEPT -out test.dbschema
The resulting file has the specified tables, but no column information,
which means the file can’t be used for CMP mapping.
Solution
When capturing a schema from the Oracle database, always use the -schemaname option with the user name in uppercase letters as the value:
bin/capture-schema -dburl jdbc:oracle:thin:@oraserver:1521:ora
-username scott -password tiger -driver oracle.jdbc.driver.OracleDriver -schemaname
SCOTT -out test.dbschema)
|