Hi,
With DDLUtils, you can also export the database schema to an XML
database independent format, so I guess that if not direcly, you could
at least export the schema from oracle to the XML format and then from
the XML to Derby.
There probably is a way of doing the same process programatically, but I
just use DDLUtils through the Ant tasks, so I don't have experience with
that. But just so you know there is at least one way of doing it.
S!
D.
Erik Drolshammer escribió:
Hi!
I want to use Derby as an in-mem substitute for Oracle for automatic
testing purposes.
I have successfully exported the schema from an existing Oracle schema
(without data) to a ddl-file, but when I try to create tables etc. in
Derby I run into problems.
Does DdlUtils support some sort of automatic conversion between
"Oracle-sql" and "Derby-sql"?
Or must I manually convert e.g. Oracle's "varchar2" to Derby's "varchar?
This is the setup I currently use:
//Create ddl from Oracle database
Oracle10Platform oracle10Platform = new Oracle10Platform();
oracle10Platform.setDataSource(dataSource);
Database database = oracle10Platform.readModelFromDatabase(name,
catalog, schema, tableTypes);
//Create Derby tables from Oracle ddl source
oracle10Platform.createTables(conn, database,
dropTablesFirst,continueOnError);