db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Dudziak" <tom...@gmail.com>
Subject Re: The DB created from XML has one more index for every table.
Date Wed, 22 Mar 2006 14:43:14 GMT
On 3/22/06, Jun Li <allanjunli@gmail.com> wrote:

> Oh no. It doesn't work here. I have to set both catalog and schema to null
> on SQL Server 2000 with JDBC driver 2005, otherwise I get nothing generated
> in the XML file.
> Therefore, the extra index problem still exists here.
> Anyone else having the same problem?

Can't really help you there then, probably a difference in the DB
setup (my SQL Server instance pretty much uses the default
configuration).
I suggest you debug into the JdbcModelReader, readTables and below, to
see what the JDBC metadata returns. You could also experiment with the
settings for the DumpMetadataTask to see what you get, what are the
schema values and so forth.

> Another issue, I can get the data outputed into XML for SQL Server, but get
> nothing for Oracle using the same codes. Any idea about this? The codes look
> like the following:
>
>     FileOutputStream fOS = new FileOutputStream(outputFile);
>     DataWriter dataWriter = new DataWriter(fOS);
>
>     // Tables that I want to get data from
>     List<Table> sysTables = getDataTables(datasource, db);
>
>     Table[] tables = new Table[1];
>     dataWriter.writeDocumentStart();
>     for (Table tb : sysTables)
>     {
>       String sql = "select * from " + tb.getName();
>       tables[0] = tb;
>       Iterator dataIt = platform.query(db, sql, tables);
>       // Write data to xml file
>       dataWriter.write(dataIt);
>     }
>     dataWriter.writeDocumentEnd();
>
>
> And the way that I read model is like:
>
>    Database db = null;
>    if ("Oracle".equalsIgnoreCase(dbType)) {
>       db = platform.readModelFromDatabase(
>           schemaName.toUpperCase(), schemaName.toUpperCase(),
> schemaName.toUpperCase(), null);
>     }
>     if ("Microsoft SQL Server".equalsIgnoreCase(dbType)) {
>       db = platform.readModelFromDatabase(schemaName, null, null, null);
>     }

Does the WriteDataToXml subtask produce any output for the same settings ?

Tom

Mime
View raw message