Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

cx_Oracle (6.1), django(1.11.7) with Oracle 12cr2 and table / column name lengths greater than 30 by

Santosh Hegde-OracleDec 19 2017 — edited Dec 19 2017

Hello,

I am trying to figure out if cx_Oracle 6.1 has support for table names and column names being longer than 30 characters. We are migrating to Oracle from another database which supported longer identifiers so we have quite a few of these identifiers.

Oracle 12cr2 now supports this so I am able to migrate all the data without having to change identifier names.

However when I try and access the data ( django 1.11.7 and cx_oracle), I end up getting an error:

django.db.utils.DatabaseError: ORA-00904: "TABLE_NAME"."COLUMN_NAME_LONGER_THAN_TH403B": invalid identifier

The actual column name for e.g. could be COLUMN_NAME_LONGER_THAN_THIRTY_BYTES

Note - This is a made up example so the mangling scheme used for the column if this was a real example might be different.

But basically, I see that the column name is shortened to 30 characters with some kind of a mangling scheme. The database obviously throws the invalid identifier error.

Is there some cx_Oracle connection parameter / setting I could be using or some environment variable etc that can resolve this?

Or is this something I need to wait for a higher release of cx_Oracle?

I checked within django quite a bit but I dont think this is happening inside of django which is why I am asking this question in this forum.

Yes, I do have the option of renaming the tables and columns but given that 12cr2 officially supports this I am trying to avoid having to change application code.

Thanks  & Regards

Santosh

Comments

riedelme
This forum is about SQL*Developer issues. You should get a better answer faster if you post in the General Oracle forum
1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jan 16 2018
Added on Dec 19 2017
1 comment
1,451 views