db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorbjørn Ravn Andersen <thunderax...@gmail.com>
Subject DatabaseIO().write(database, file) does not write index information
Date Fri, 04 Nov 2005 12:25:32 GMT
I wish to use ddlutils to compare two schemas to see if they are 
identical, and if not, where.  I am starting with Oracle but will 
include DB2 plus some java based database for testing very soon.

I have the following snippet:

    private static Database getDatabase(String schema, String url,
            String username, String password, String name, Properties p)
            throws SQLException {
        Connection jdbcConnection = DriverManager.getConnection(url, 

        JdbcModelReader r = new JdbcModelReader();
        String thiscatalog = null;
        String thisschema = schema;
        Database d = r.getDatabase(jdbcConnection, thiscatalog, thisschema,
                new String[] {});
        Table[] t = d.getTables();

        return d;

which I call like this:

            d = getDatabase(schema, url, username, password, name, p);
            new DatabaseIO().write(d, "vmtra03-axs.xml");

which returns the tables I expect (after upgrading to the 10g JDBC 
driver).  It does not, however, return index information on the tables, 
which is needed too.  I looked in the code, and saw that apparently this 
requires additional invocations to get loaded, but wanted to ask on the 
status on the list first.

I also expect to have to deal with sequences, but have not gotten that 
far yet.

Could a knowledgeable person let me know how to include index 
information to what I have?

Best Regards,

View raw message