Friday, June 1, 2012

Oracle schema not working

Hello. The user connecting to Oracle is an ordinary user and needs to
prefix all tables with the schema name.
I've tried crafting Meta.db_table like so:
http://cd-docdb.fnal.gov/cgi-bin/RetrieveFile?docid=3156&version=1&filename=DjangoOracle.html

But I get error

DatabaseError at /

schema "foo" does not exist
LINE 1: ...ty", "foo"."table_name"."address_country" FROM "foo"."...


I also tried wrapping request in a TransactionMiddleware and execute
this SQL before the fetching (modifying Meta accordingly):
MyModel.objects.raw('ALTER SESSION SET CURRENT_SCHEMA=foo')

Neither way helped. The user has the needed permissions.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment