db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jun Li" <allanju...@gmail.com>
Subject Re: The DB created from XML has one more index for every table.
Date Tue, 21 Mar 2006 23:16:18 GMT
>
>
> Yup, but I found that it is necessary to set both to their respective
> values instead of null (e.g. for the tests:
>
> http://svn.apache.org/viewcvs.cgi/db/ddlutils/trunk/src/test/jdbc.properties.sqlserver2000?view=markup
> ),
> otherwise too much info was returned. Though all-uppercase is probably
> not required (as opposed to Oracle).
>
> Tom



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?

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);
    }



--
--------------
Cheers,
Jun

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message