Oracle connection "cx_Oracle.DatabaseError: ORA-00911: invalid character"

948 views
Skip to first unread message

Doug

unread,
May 17, 2009, 3:14:29 PM5/17/09
to Django users
When I attempt to use Oracle as the backend for Django, I get this
error on issuing the 'syndb' command:
"cx_Oracle.DatabaseError: ORA-00911: invalid character".

** Configuration: Python 2.5; cx_Oracle 5.0.1- 10g

** Setting: Backend=oracle; User=django; PW=django; Host=BLANK;
Port=BLANK

** Complete Error Stack:

Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_manager(settings)
File "C:\Python25\lib\site-packages\django\core\management.py", line
1672, in
execute_manager
execute_from_command_line(action_mapping, argv)
File "C:\Python25\lib\site-packages\django\core\management.py", line
1571, in
execute_from_command_line
action_mapping[action](int(options.verbosity),
options.interactive)
File "C:\Python25\lib\site-packages\django\core\management.py", line
534, in s
yncdb
cursor.execute(statement)
File "C:\Python25\lib\site-packages\django\db\backends\oracle
\base.py", line 7
2, in execute
return Database.Cursor.execute(self, query, params)
cx_Oracle.DatabaseError: ORA-00911: invalid character


** I can connect outside of Django:
>>> USER = 'django'; DATABASE_PW = 'django'; DATABASE_NAME = 'XE';
>>> conn_str = "%s/%s@%s" % (USER, DATABASE_PW, DATABASE_NAME)
>>> conn_str
'django/django@XE'
>>> myDB = cx_Oracle.connect(conn_str)
>>> myDB
<cx_Oracle.Connection to django@XE>

Can someone help me with some guidance? What am I doing wrong?

Regards,
Doug
www.rmsfinance.com

Karen Tracey

unread,
May 17, 2009, 4:58:07 PM5/17/09
to django...@googlegroups.com
On Sun, May 17, 2009 at 3:14 PM, Doug <doug....@rmsfinance.com> wrote:

When I attempt to use Oracle as the backend for Django, I get this
error on issuing the 'syndb' command:
"cx_Oracle.DatabaseError: ORA-00911: invalid character".

** Configuration:  Python 2.5; cx_Oracle 5.0.1- 10g

and Django version...?
 

The file django\core\management.py, referenced several times in that traceback, doesn't exist in Django 1.0.  It existed in Django 0.96 but was refactored into a directory django\core\management before the 1.0 release.  So you seem to be running some version of Django lower than 1.0.  Yet 1.0 was the first version to have working Oracle support -- the branch that got Oracle working wasn't merged back to trunk until after 0.96 was released. 

So, if you are running a 0.96.x version of Django I wouldn't expect the Oracle backend to work there.  If you are running an SVN checkout from after the Oracle branch merge (r5519), I have no idea what's going wrong.

Karen

Doug

unread,
May 18, 2009, 7:03:09 AM5/18/09
to Django users
Thanks for your response Karen. And I am so new into Django that
there is no real harm is re-installing v1, and trying again. However,
I believe that I am experiencing the problem with V1. I'll let you
know what I find.

Doug

On May 17, 4:58 pm, Karen Tracey <kmtra...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages