Opened 7 years ago

Closed 7 years ago

#12827 closed (duplicate)

ORA-12899 error with oracle syncdb

Reported by: Jacek Furmankiewicz <jacek99@…> Owned by: nobody
Component: Database layer (models, ORM) Version: 1.1
Severity: Keywords: oracle syncdb
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by Karen Tracey)

I pointed to an Oracle DB and tried to run syncdb for the first time.
Got this error:

cx_Oracle.DatabaseError: ORA-12899: value too large for column "CENTRAL_JACEKF"."AUTH_PERMISSION"."NAME" (actual: 60, maximum: 50)

Traceback (most recent call last):
  File "./", line 12, in <module>
  File "/usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/django/core/management/", line 362, in execute_manager
  File "/usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/django/core/management/", line 303, in execute
  File "/usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/django/core/management/", line 195, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/django/core/management/", line 222, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/django/core/management/", line 351, in handle
    return self.handle_noargs(**options)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/django/core/management/commands/", line 99, in handle_noargs
    emit_post_sync_signal(created_models, verbosity, interactive)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/django/core/management/", line 205, in emit_post_sync_signal
  File "/usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/django/dispatch/", line 166, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/django/contrib/auth/management/", line 28, in create_permissions
    defaults={'name': name, 'content_type': ctype})
  File "/usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/django/db/models/", line 123, in get_or_create
    return self.get_query_set().get_or_create(**kwargs)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/django/db/models/", line 335, in get_or_create
  File "/usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/django/db/models/", line 410, in save
    self.save_base(force_insert=force_insert, force_update=force_update)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/django/db/models/", line 495, in save_base
    result = manager._insert(values, return_id=update_pk)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/django/db/models/", line 177, in _insert
    return insert_query(self.model, values, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/django/db/models/", line 1087, in insert_query
    return query.execute_sql(return_id)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/django/db/models/sql/", line 320, in execute_sql
    cursor = super(InsertQuery, self).execute_sql(None)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/django/db/models/sql/", line 2369, in execute_sql
    cursor.execute(sql, params)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/django/db/backends/", line 19, in execute
    return self.cursor.execute(sql, params)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg/django/db/backends/oracle/", line 443, in execute
    raise e
cx_Oracle.DatabaseError: ORA-12899: value too large for column "CENTRAL_JACEKF"."AUTH_PERMISSION"."NAME" (actual: 60, maximum: 50)

Ununtu 9.10. Oracle 10g

Change History (3)

comment:1 Changed 7 years ago by Jacek Furmankiewicz <jacek99@…>

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

Verified that in the DB the AUTH_PERMISSION.NAME column was created as NVARCHAR2(50). Other rows are present in the table, so it's just one of the default INSERTs that must have blown the limit

comment:2 Changed 7 years ago by Jacek Furmankiewicz <jacek99@…>

I changed the column to NVARCHAR(60), but that was not enough. Got another error that required 63 chars. So changing it to NVARCHAR2(63) in the DB via ALTER TABLE allowed me to get past this error.

comment:3 Changed 7 years ago by Karen Tracey

Description: modified (diff)
Resolution: duplicate
Status: newclosed

Reformatted description -- please use WikiFormatting and preview before submitting.

This really has nothing to do with Oracle specifically -- any DB that enforces the defined limit will show the problem. The problem of permission names being rather short is already noted in #8162.

Note: See TracTickets for help on using tickets.
Back to Top