Return-Path: Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 59023 invoked from network); 18 Apr 2003 13:27:30 -0000 Received: from mail.vizuri.com (63.91.143.15) by daedalus.apache.org with SMTP; 18 Apr 2003 13:27:30 -0000 Received: from sdhaliwal (unknown [63.91.143.215]) by mail.vizuri.com (Postfix) with ESMTP id BACD42FE809 for ; Fri, 18 Apr 2003 09:47:00 -0400 (EDT) From: "Swarn Dhaliwal" Sender: "Swarn Dhaliwal" To: "'Turbine Torque Users List'" Subject: RE: Creating Database Schema Date: Fri, 18 Apr 2003 09:27:28 -0400 Message-ID: <000601c305ae$41ed3960$d08f5b3f@aemeast.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 Importance: Normal In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4920.2300 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N David, That worked very well. Thank you very much. Regards, Swarn -----Original Message----- From: David Hakim [mailto:dhakim@webcodex.com]=20 Sent: Thursday, April 17, 2003 9:34 PM To: Turbine Torque Users List Subject: Re: Creating Database Schema The MSSQL JDBC driver from microsoft has a weird behavior for when the =20 getTables() method is called on connection metadata. If nothing is =20 passed in for the schemaPattern, no tables are returned. This is what =20 happens by default in the TorqueJDBCTransformTask. There is however a =20 way around this. In your build.properties file, you can pass the =20 property: torque.database.schema =3D % Now torque will generate the schema for all the tables in the database. You may also be able to pass the database name itself as the value for =20 this property ... I haven't tried that yet tho. This does bring up a related, potential feature enhancement :) It sure =20 would be nice if torque took a property for the tableNamePattern =20 argument of getTables(). With it torque would be able to generate the =20 XML schema for only those tables matching a specific pattern ... which =20 would be awful handy :) -Dave On Thursday, April 17, 2003, at 06:51 PM, Swarn Dhaliwal wrote: > Hi all, > I have been trying to generate schema.xml from an MSSQLServer > database using torque-jdbc task. The task seems to execute without any > problems but the schema.xml file it generates is empty. Here is the > information I used to run it and the output. > > torque.database.createUrl =3D > jdbc:microsoft:sqlserver://=20 > hostname:1433;DatabaseName=3Dmydbname;SelectMet > hod=3Dcursor > torque.database.buildUrl =3D > jdbc:microsoft:sqlserver://=20 > hostname:1433;DatabaseName=3Dmydbname;SelectMet > hod=3Dcursor > torque.database.url =3D > jdbc:microsoft:sqlserver://=20 > hostname:1433;DatabaseName=3Dmydbname;SelectMet > hod=3Dcursor > torque.database.driver =3D = com.microsoft.jdbc.sqlserver.SQLServerDriver > torque.database.user =3D username > torque.database.password =3D password > torque.database.host =3D hostname > > The following output is generated > > > "http://jakarta.apache.org/turbine/dtd/database.dtd"> > > > > > Any advice as what am I doing wrong will be greatly appreciated. > > Regards, > Swarn > > -----Original Message----- > From: Rolf Jentsch [mailto:RJentsch@electronicpartner.de] > Sent: Monday, April 14, 2003 8:14 AM > To: Turbine Torque Users List; Ronny Walter > Subject: Re: Creating Database Schema > > Hello, > > Am Montag, 14. April 2003 14:02 schrieb Ronny Walter: >> Hello Mailinglist, >> >> Is there a possibility to get the Schema automaticly created? I have a >> large database with a lot of tables and i don't like to key in all the >> values. :-) >> >> Greetings Ronny > > there is the "jdbc" target in build-torque.xml. It will transfer most > of > the > structure of your database into a schema.xml file. > > There are some problems with this task: you will loose all information > about > additional indexes, and you may loose the size of numeric fields. So =20 > you > will > have to check the results. > > cu > Rolf Jentsch > Produktentwicklung EDV-Anwendungen f=FCr Mitglieder > ElectronicPartner GmbH & Co. KG > D=FCsseldorf > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org > For additional commands, e-mail: torque-user-help@db.apache.org > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org > For additional commands, e-mail: torque-user-help@db.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org