0

I am trying to connect Oracle in my Django Project, but with no success.

My versions:

Python 3.7 x86
Django 2.1.1
Oracle Client 12.2.0.1.0 x86
Oracle Database 12.2.0.1.0 x64
cx-Oracle 7.0.0

settings.py file:

 DATABASES = {
 'default': {
  'ENGINE': 'django.db.backends.oracle',
  'NAME': 'lopestrc',
  'USER': 'django',
  'PASSWORD': 'django',
  'HOST': '192.168.0.208',
  'PORT': '1521'
  } 
}

My tnsping response just fine and I can connect on database from my client station. Results are below:

But, when I try to migrate for the first time, I receive this error below:

django.db.utils.DatabaseError: ORA-00955: name is already used by an existing object

I haven't found any help on internet. Don't know what to do anymore.

Does anyone can help?

Thanks

aluiz
  • 63
  • 5

1 Answers1

0

That error implies that the connection was indeed successful but some statement that Django is trying to execute is failing. I'm not sure if Django itself has the ability to log the statements that it is executing, but cx_Oracle 6+ can do so if you set the environment variable DPI_DEBUG_LEVEL to the value 16.

Anthony Tuininga
  • 6,388
  • 2
  • 14
  • 23