Okay, so I'm connected to an oracle database in python 2.7 and cx_Oracle 5.1 compiled against the instant client 11.2. I've got a cursor to the database and running SQL is not an issue, except this:
cursor.execute('ALTER TRIGGER :schema_trigger_name DISABLE',
schema_trigger_name='test.test_trigger')
or
cursor.prepare('ALTER TRIGGER :schema_trigger_name DISABLE')
cursor.execute(None,{'schema_trigger_name': 'test.test_trigger'})
both result in an error from oracle:
Traceback (most recent call last):
File "connect.py", line 257, in
cursor.execute('ALTER TRIGGER :schema_trigger_name DISABLE',
schema_trigger_name='test.test_trigger')
cx_Oracle.DatabaseError: ORA-01036: illegal variable name/number
While running:
cursor.execute('ALTER TRIGGER test.test_trigger DISABLE')
works perfectly. What's the issue with binding that variable?