From torque-user-return-6327-apmail-db-torque-user-archive=db.apache.org@db.apache.org Thu Jul 28 13:56:14 2005 Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 54940 invoked from network); 28 Jul 2005 13:56:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Jul 2005 13:56:14 -0000 Received: (qmail 48128 invoked by uid 500); 28 Jul 2005 13:56:12 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 48108 invoked by uid 500); 28 Jul 2005 13:56:12 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 48095 invoked by uid 99); 28 Jul 2005 13:56:12 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jul 2005 06:56:11 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [194.175.229.106] (HELO mail.seitenbau.net) (194.175.229.106) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jul 2005 06:56:03 -0700 Received: from [195.127.188.18] (helo=www.seitenbau.net) by router1.seitenbau.net with esmtp (Exim 4.43) id 1Dy8rn-00088H-Ck for torque-user@db.apache.org; Thu, 28 Jul 2005 15:56:07 +0200 In-Reply-To: <42E8DD59.1010901@provima.com> Subject: RE: JDBC Task & System Tables To: "Apache Torque Users List" X-Mailer: Lotus Notes Release 6.0 September 26, 2002 Message-ID: From: Thomas Fischer Date: Thu, 28 Jul 2005 15:56:05 +0200 X-MIMETrack: Serialize by Router on www/seitenbau(Release 6.5.1|January 21, 2004) at 28.07.2005 03:56:06 PM MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, I cannot see in the code why the test table should happen. The code (org.apache.torque.task.TorqueJDBCTransformTask)is like this: ..... // Attemtp to connect to a database. Connection con = DriverManager.getConnection(dbUrl, dbUser, dbPassword); log("DB connection established"); // Get the database Metadata. DatabaseMetaData dbMetaData = con.getMetaData(); // The database map. List tableList = getTableNames(dbMetaData); ..... and getTableNames(dbMetaData) looks like: public List getTableNames(DatabaseMetaData dbMeta) throws SQLException { log("Getting table list..."); List tables = new ArrayList(); ResultSet tableNames = null; // these are the entity types we want from the database String[] types = {"TABLE", "VIEW"}; try { tableNames = dbMeta.getTables(null, dbSchema, "%", types); while (tableNames.next()) { String name = tableNames.getString(3); String type = tableNames.getString(4); tables.add(name); } } finally { if (tableNames != null) { tableNames.close(); } } return tables; } Could you please create a small test case including the above code and debug it in order to see wyh the test table is not in the tableList ? Thomas Trey Long schrieb am 28.07.2005 15:27:53: > Torque Version: 3.2-rc1 > Using: ANT, MSSQL > > I have managed to get Torque working with MSSQL by setting the > {torque.database.schema} variable to the owner of the database. I am > running the MSSQL Profiler which tells me all of the sql commands run > through the server. Torque uses the following command to list tables: > > sp_tables '%', 'dbo', null, "'TABLE','VIEW'" > > Which returns: > bookstore dbo dtproperties TABLE NULL > bookstore dbo test TABLE NULL > bookstore dbo sysconstraints VIEW NULL > bookstore dbo syssegments VIEW NULL > > Yet, for some reason that I haven't been able to figure out it only > processes 'dtproperties', 'syscontraints' and 'syssegments'. The 3 > tables I really DON'T want. > > I have listed the output log here to help with understanding what is > going on. > > [torque-jdbc-transform] Torque - JDBCToXMLSchema starting > [torque-jdbc-transform] Your DB settings are: > [torque-jdbc-transform] driver : > com.microsoft.jdbc.sqlserver.SQLServerDriver > [torque-jdbc-transform] URL : > jdbc:microsoft:sqlserver://localhost:1433;SelectMethod=cursor > [torque-jdbc-transform] user : torque > [torque-jdbc-transform] schema : dbo > [torque-jdbc-transform] DB driver sucessfuly instantiated > [torque-jdbc-transform] DB connection established > [torque-jdbc-transform] Getting table list... > [torque-jdbc-transform] Building column/table map... > [torque-jdbc-transform] Processing table: dtproperties > [torque-jdbc-transform] Processing table: sysconstraints > [torque-jdbc-transform] Processing table: syssegments > [torque-jdbc-transform] ~edit~src/schema/schema.xml > [torque-jdbc-transform] Torque - JDBCToXMLSchema finished > > If anyone could shed some light on this, I would be immensely grateful. > > --------------------------------------------------------------------- > 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