#13565: Using syncdb with Oracle using synonyms causes ORA-00955.
------------------------------------------+---------------------------------
Reporter: [email protected] | Owner: nobody
Status: new | Milestone:
Component: Database layer (models, ORM) | Version: 1.2
Keywords: | Stage: Unreviewed
Has_patch: 0 |
------------------------------------------+---------------------------------
When working with legacy databases and Django, Oracle has a nice feature
to alias a table to match what Django thinks it should be. (Which is
absolutely needed when the table you're referencing is in another user's
schema.)
Unfortunately, the table creation SQL doesn't detect the alias, and sees
the table as missing. When it tries to create it, you get a ORA-00955
error. (Name is already used by an existing object).
{{{
Creating table users_foo
Traceback (most recent call last):
File "./manage.py", line 11, in <module>
execute_manager(settings)
File "/usr/local/lib/python2.6/dist-
packages/Django-1.2-py2.6.egg/django/core/management/__init__.py", line
438, in execute_manager
utility.execute()
File "/usr/local/lib/python2.6/dist-
packages/Django-1.2-py2.6.egg/django/core/management/__init__.py", line
379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.6/dist-
packages/Django-1.2-py2.6.egg/django/core/management/base.py", line 191,
in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/local/lib/python2.6/dist-
packages/Django-1.2-py2.6.egg/django/core/management/base.py", line 218,
in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python2.6/dist-
packages/Django-1.2-py2.6.egg/django/core/management/base.py", line 347,
in handle
return self.handle_noargs(**options)
File "/usr/local/lib/python2.6/dist-
packages/Django-1.2-py2.6.egg/django/core/management/commands/syncdb.py",
line 95, in handle_noargs
cursor.execute(statement)
File "/usr/local/lib/python2.6/dist-
packages/Django-1.2-py2.6.egg/django/db/backends/util.py", line 15, in
execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.6/dist-
packages/Django-1.2-py2.6.egg/django/db/backends/oracle/base.py", line
507, in execute
return self.cursor.execute(query, self._param_generator(params))
django.db.utils.DatabaseError: ORA-00955: name is already used by an
existing object
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/13565>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.