db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Della Bitta <mdb2...@columbia.edu>
Subject Re: DB2 datasource
Date Thu, 18 Dec 2003 16:12:46 GMT
i think the problem is that DB2 assumes the schema = the username if  
none is provided in the sql. so you're creating all your tables under  
schema DB2ADM, and trying to access them as if they were in schema  
USER.

i'm unaware of the support for database schemas in Torque. i seem to  
remember someone working on some patches for that, but deciding against  
using them because it would fork from the main source.

is there anyone more informed than i am that wants to chime in?

michael


On Dec 18, 2003, at 3:57 AM, Charles-Alexandre Sabourdin wrote:

> Probleme with datasource and maybe SQL:
>
> Hello, I have the following problems :
> Basically I use two different users 1 for administating (user=db2adm)  
> and one
> only has a reader (user=user).
>
> note :
> SELECT * FROM Table1 =>
> Error: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/LINUX]  
> SQL0204N Le
> nom "USER.TABLE1" n'est pas défini.  SQLSTATE=42704
>
> while
> SELECT * FROM DB2ADM.Table1 => Works correctly
> Here are my Torque.properties
>
> --
> torque.applicationRoot=/home/kaneda/java/tomcat
> # Sets the driver for the data sources.
> torque.defaults.connection.driver=COM.ibm.db2.jdbc.net.DB2Driver
>
> # Sets the URL for the datasources
> torque.defaults.connection.url=jdbc:db2://192.168.1.9:6789/TESTUSED
>
> # Sets login and password for the data sources.
> torque.defaults.connection.user=user
> torque.defaults.connection.password=***
>
> torque.database.TESTUSED.adapter=db2net
>
> ## Using commons-dbcp
> torque.dsfactory.TESTUSED.factory=org.apache.torque.dsfactory.SharedPoo 
> lDataSourceFactory
> torque.dsfactory.TESTUSED.connection.driver=COM.ibm.db2.jdbc.net.DB2Dri 
> ver
> torque.dsfactory.TESTUSED.connection.url=jdbc:db2://192.168.1.9:6789/ 
> TESTUSED
> # This works correctly
> #torque.dsfactory.TESTUSED.connection.user=db2adm
> #torque.dsfactory.TESTUSED.connection.password=*****
> torque.dsfactory.TESTUSED.connection.user=user
> torque.dsfactory.TESTUSED.connection.password=*****
>
>
>
> -- 
> Charles-Alexandre
> SABOURDIN
> -----------------
>
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message