Sven A. Schmidt wrote: > > Hi, > > I've hit a problem very recently with autoloading of table info from > an oracle schema which I believe is caused by a problem inside the > _resolve_synonym method of oracle/base.py. I've googled around a bit > but didn't find this issue reported previously. It may well be a > problem with our db setup but I'm hoping folks on this list will be > able to shed some light on it either way :) > > What's happening is that in the db there are two rows returned when > running the query > > select OWNER, TABLE_OWNER, TABLE_NAME, SYNONYM_NAME from ALL_SYNONYMS > WHERE table_name = 'REQUESTS'; > > Result: > > AINV_REPORT AINV_OWNER REQUESTS REQUESTS > AINV_USER AINV_OWNER REQUESTS REQUESTS > > Inside _resolve_synonym this query is run and if len(rows) >1 the > following error is raised: > > "There are multiple tables visible to the schema, you must specify > owner" > > I was thinking that perhaps the query used inside _resolve_synonyms > could/should include a check on the synonym owner to exclude multiple > matches of the same table exists as a synonym in another user's > schema. Or would that break other things? >
this assumes that you need to use the resolve_synonyms feature in the first place (its off by default). oracle_resolve_synonyms is probably not worth using if you aren't using DBLINK (and maybe not even if you are) - that was the original use case for it. If you leave the feature off and just reflect "requests", the whole function won't get involved. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---