1.6.2012 10:43, rahajiyev kirjoitti:
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.


Since Oracle doesn't make a difference between user and schema (they're equivalents)

Simplest thing is to create (private/public) synonyms for tables for user in question. Otherwise you need to prefix with schema name.

See also ticket https://code.djangoproject.com/ticket/6148

--
Jani Tiainen

- Well planned is half done and a half done has been sufficient before...

--
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to