On Thu, Apr 28, 2011 at 9:47 PM, Robert <web...@gm...> wrote:
> Oracle Server: 11g
> Client@Win7 : Instant Client 10g
> Python: v 2.7
>
>>>> cx_Oracle.clientversion()
> (10, 2, 0, 5, 0)
>>>> cx_Oracle.buildtime
> 'Mar 19 2011 23:12:21'
>>>> cx_Oracle.apilevel
> '2.0'
>
> Got this error:
>
>>>> db = cx_Oracle.connect(OraUid + "/" + OraPwd + "@" + OraService)
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> cx_Oracle.DatabaseError: ORA-24315: illegal attribute type
This is because you are using cx_Oracle compiled against 11g but
actually using cx_Oracle against 10g. You can't do that!
> I think it is because I installed the 11g version of cx_Oracle
> (cx_Oracle-5.1-11g.win32-py2.7.msi)
Yes.
> so 2 questions:
> 1) How to verify the exact version/edition of cx_Oracle installed ?
cx_Oracle.version
That will tell you the version of cx_Oracle. It might be useful to
also include whether it is 10g, 11g, etc. as well.
> 2) Can I just install this : cx_Oracle-5.1-10g.win32-py2.7.msi or
> should I uninstall the existing version ?
Uninstall the original version first. The MSI packages are independent
of each other.
Anthony
|