I\'m using sqlalchemy with elixir on multiple databases. Currently everything works well with multiple sessions -- one bind to a different database. However, there are cases
Hit a similar issue with Oracle as the DB. The schema name was different between the DB instances, so hopefully this is analogous to your situation.
The method to resolve this was to initially fire a simple query to the DB to determine the owner of the schema objects:
SELECT owner FROM ALL_OBJECTS WHERE object_name = :obj_name AND object_type = :obj_type
Then use the resulting scalar as the value for the schema parameter on your reflected tables:
mytable = Table(name='my_table_name',
metadata=my_bound_metadata,
autoload=True,
schema=schema_owner)