more than one RDBMS

1 view
Skip to first unread message

Marco Mariani

unread,
Dec 11, 2006, 9:57:48 AM12/11/06
to turbo...@googlegroups.com
Hi there

I need to connect to more DBMS servers (both sqlalchemy, both autoload,
one postgres and one mysql) and would like to integrate nicely with the
existent structure

Is there an example somewhere?
Do I just tinker with database.py or do you foresee a standard way to do
that in the current or following releases?

Thanks

Joe Baker

unread,
Dec 11, 2006, 10:47:35 AM12/11/06
to turbo...@googlegroups.com
I've added package "build-essential" to the Ubutnu installation
instructions.

I've been having problems with the
tg-admin sql create
command not working when using a sqlite db.

After installing this package, the command works flawlessly.

So this is where the page is updated:
http://docs.turbogears.org/1.0/InstallUbuntu

Here is where I found out about the missing dependency:
http://trac.turbogears.org/turbogears/ticket/748


-Joe Baker
IT Administrator
NEL Frequency Controls, Inc.
Burlington, Wisconsin 53105

Jorge Vargas

unread,
Dec 12, 2006, 9:25:02 AM12/12/06
to turbo...@googlegroups.com
why not use 2 engine objects?
> Thanks
>
>
> >
>

Arnar Birgisson

unread,
Dec 12, 2006, 10:19:58 AM12/12/06
to turbo...@googlegroups.com

Sorry, but that's not very helpful. Obviously 2 engine objects are needed.

I have an application that uses a SQLite db for user managment and
session data, and then connects to two different MS-SQL databases
simultaneously - albeit on a read only access.

I'm afraid I can't provide you with an example, but you should be able
to more or less just mirror lines 22-48 in
http://trac.turbogears.org/turbogears/browser/trunk/turbogears/database.py
replacing the configuration key with your own, and storing references
to the metadata and session somewhere else.

Of course, you will have two different sessions, one for each
database. SA doesn't support sharing a uow session between multiple
engines - so beware that those sessions will not be flushed
automatically upon request finalization.

Arnar

Reply all
Reply to author
Forward
0 new messages