Return-Path: Delivered-To: apmail-db-ddlutils-user-archive@www.apache.org Received: (qmail 74392 invoked from network); 22 Mar 2006 14:44:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Mar 2006 14:44:33 -0000 Received: (qmail 8043 invoked by uid 500); 22 Mar 2006 14:43:38 -0000 Delivered-To: apmail-db-ddlutils-user-archive@db.apache.org Received: (qmail 7974 invoked by uid 500); 22 Mar 2006 14:43:38 -0000 Mailing-List: contact ddlutils-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ddlutils-user@db.apache.org Delivered-To: mailing list ddlutils-user@db.apache.org Received: (qmail 7961 invoked by uid 99); 22 Mar 2006 14:43:37 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Mar 2006 06:43:37 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of tomdzk@gmail.com designates 66.249.92.199 as permitted sender) Received: from [66.249.92.199] (HELO uproxy.gmail.com) (66.249.92.199) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Mar 2006 06:43:36 -0800 Received: by uproxy.gmail.com with SMTP id m2so60066uge for ; Wed, 22 Mar 2006 06:43:15 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=MD5L0UzFn8MhjFRj6jLtgS0qxiit9VvU7lAIjTgLa1vHuoDURHryuvMJcwsO+AG1BHBP0A8FAQSw8TfLseKTHbxIcj4HWFxBJOEQk6ioWxW2ERxDWuskxj/gqqkhGCO7LfRS/2xyCXcds198WnS0IPU9YmKgfIaii2Uf6l8s8oE= Received: by 10.78.13.18 with SMTP id 18mr8903hum; Wed, 22 Mar 2006 06:43:14 -0800 (PST) Received: by 10.78.42.15 with HTTP; Wed, 22 Mar 2006 06:43:14 -0800 (PST) Message-ID: <224f32340603220643o52623fcet9b35284ad2494910@mail.gmail.com> Date: Wed, 22 Mar 2006 15:43:14 +0100 From: "Thomas Dudziak" To: ddlutils-user@db.apache.org Subject: Re: The DB created from XML has one more index for every table. In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <224f32340603121558t5a322b50o940e031b544c3fdb@mail.gmail.com> <224f32340603200006t45262c43qa0b821dfdba19355@mail.gmail.com> <224f32340603210230t6ce7c04co8e1eeed32e7bd23d@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 3/22/06, Jun Li wrote: > Oh no. It doesn't work here. I have to set both catalog and schema to nul= l > on SQL Server 2000 with JDBC driver 2005, otherwise I get nothing generat= ed > 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 g= et > nothing for Oracle using the same codes. Any idea about this? The codes l= ook > like the following: > > FileOutputStream fOS =3D new FileOutputStream(outputFile); > DataWriter dataWriter =3D new DataWriter(fOS); > > // Tables that I want to get data from > List sysTables =3D getDataTables(datasource, db); > > Table[] tables =3D new Table[1]; > dataWriter.writeDocumentStart(); > for (Table tb : sysTables) > { > String sql =3D "select * from " + tb.getName(); > tables[0] =3D tb; > Iterator dataIt =3D 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 =3D null; > if ("Oracle".equalsIgnoreCase(dbType)) { > db =3D platform.readModelFromDatabase( > schemaName.toUpperCase(), schemaName.toUpperCase(), > schemaName.toUpperCase(), null); > } > if ("Microsoft SQL Server".equalsIgnoreCase(dbType)) { > db =3D platform.readModelFromDatabase(schemaName, null, null, null)= ; > } Does the WriteDataToXml subtask produce any output for the same settings ? Tom