You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by JohnSimpson <jo...@bankofamerica.com> on 2007/11/20 18:44:37 UTC

Default datasource schema

Hi,

Is it possible to set a default database schema for a Geronimo datasource? 
If so, how?

Thanks,

John
-- 
View this message in context: http://www.nabble.com/Default-datasource-schema-tf4844976s134.html#a13861833
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Default datasource schema

Posted by JohnSimpson <jo...@bankofamerica.com>.
Hi David,

I am using DB2 version 8.  The way I understand it to work is that the
schema defaults to the user-id unless a schema is specified in the SQL. 
This is done by adding to the table name, that is:

select * from tableName;
becomes:
select * from schemaName.tableName;

If I wanted to override the schemaName on the fly I would do something like:

set current sqlid = schemaName;
select * from tableName;

Does that make sense?

Thanks,

john

-- 
View this message in context: http://www.nabble.com/Default-datasource-schema-tf4844976s134.html#a13895367
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Default datasource schema

Posted by David Jencks <da...@yahoo.com>.
On Nov 20, 2007, at 9:44 AM, JohnSimpson wrote:

>
> Hi,
>
> Is it possible to set a default database schema for a Geronimo  
> datasource?
> If so, how?

You can only set the properties for the resource adapter.  For  
several popular databases we include a database specific resource  
adapter, but I'm not sure if any allow you to set the default  
schema.  My understanding (which could be very wrong) is that for  
many databases the default schema is the same as the user name.

Basically, if there's a specific database that tranql provides a  
wrapper for that provides another way of setting the default schema  
as a datasource property we can  easily add it to the tranql  
wrapper.  What database are you using and how can one set the default  
schema for it?

thanks
david jencks

>
> Thanks,
>
> John
> -- 
> View this message in context: http://www.nabble.com/Default- 
> datasource-schema-tf4844976s134.html#a13861833
> Sent from the Apache Geronimo - Users mailing list archive at  
> Nabble.com.
>