Python-Oracle connection problem with Pyodbc
Tried connecting to Oracle database using Pyodbc:
try:
db_connection = pyodbc.connect('DSN=OraDev; PWD=%s' % Key.dbKeys['password'])
except pyodbc.Error, err:
print >> debug_file, "Database connection failed: %s" %err
sys.exit()
and it keeps giving me this error message:
'[IM014] [Microsoft] [ODBC Driver Manager] Specified DSN contains an architecture mismatch between driver and application (0) (SQLDriverConnect)
So I'm wondering if the culprit is that I don't have "matching" components. I currently have:
- Python 2.7 32bit
- Pyodbc 3.0.6 win32-py2.7
- Oracle ODBC Driver: 32bit
- Windows Server 2008 64bit
- Oracle 11.2.0 64bit
Is there something wrong with the versions here? Thank.
source to share
The problem you are facing is that 64 bit Windows does not work well with 32 bit ODBC. You can read about it here:
The work around is to tune the target ODBC driver for the architecture you want to implement.
A side note trying to implement ODBC for oracle on a mixed architecture platform has become a headache for us. So, we have implemented access to oracle via CX_Oracle
source to share