cx-oracle

How to fix cx_Oracle: DLL load failed?

混江龙づ霸主 提交于 2020-01-07 03:06:20
问题 There are so many related questions that I have gone through which made me wonder how come this is such a prevalent issue? Anyways, I am trying to use cx_Oracle module . I have the : instant client: instantclient-basic-win32-11.1.0.6.0.zip python - 3.4 cx_Oracle - cx_Oracle-5.2-11g.win32-py3.4.exe I have set up Path as well as the ORACLE_HOME variables. Why is that I still get this error? Edit : I tried installing cx_oracle again, but this time through install command on the setup.py instead

How to read a cx_Oracle.OBJECT with type cx_Oracle.ObjectType SYS.XMLTYPE?

痞子三分冷 提交于 2020-01-06 14:09:08
问题 I'm trying read the content of a XMLType column from Oracle with cx_Oracle but i don't get it. >>> row (318, 379, 1, <cx_Oracle.OBJECT object at 0xef21ea0>) >>> col = row[3] >>> print col <cx_Oracle.OBJECT object at 0xef21ea0> >>> print col.type <cx_Oracle.ObjectType SYS.XMLTYPE> How can I read the content of a cx_Oracle.OBJECT with type cx_Oracle.ObjectType SYS.XMLTYPE ? 回答1: As said in Ivan's comment, a solution is compile a cx_Oracle with libxml.a . As workaround, I used the solution

How to read a cx_Oracle.OBJECT with type cx_Oracle.ObjectType SYS.XMLTYPE?

…衆ロ難τιáo~ 提交于 2020-01-06 14:09:07
问题 I'm trying read the content of a XMLType column from Oracle with cx_Oracle but i don't get it. >>> row (318, 379, 1, <cx_Oracle.OBJECT object at 0xef21ea0>) >>> col = row[3] >>> print col <cx_Oracle.OBJECT object at 0xef21ea0> >>> print col.type <cx_Oracle.ObjectType SYS.XMLTYPE> How can I read the content of a cx_Oracle.OBJECT with type cx_Oracle.ObjectType SYS.XMLTYPE ? 回答1: As said in Ivan's comment, a solution is compile a cx_Oracle with libxml.a . As workaround, I used the solution

cx_oracle OSX install error

情到浓时终转凉″ 提交于 2020-01-05 23:28:39
问题 So I followed these directions here to install Oracle InstantClient, installing Oracle Instantclient on Mac OS/X without setting environment variables? But when I try to install cx_oracle I get the following stack trace, python setup.py build running build running build_ext building 'cx_Oracle' extension creating build creating build/temp.macosx-10.6-universal-2.6-10g gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386

Installing the Python cx_Oracle module in Windows and connecting to an Oracle database

痞子三分冷 提交于 2020-01-05 01:13:11
问题 I've been trying to get this installed and setup, and despite there been several links describing how to do this, I'm just not getting this to work. I'll describe first the setup: My PC: Windows 8.1 Enterprise (62 Bit) Remote Server: Oracle DB Version 12.1.0.2 C:\Users\Pymat\Oracle\instantclient_12_1 Here is where oraocci12.dll is located, as well as other folders and files C:\Users\Pymat\AppData\Local\Continuum\Anaconda3 Here is where the python.exe is located (i.e. os.path.dirname(sys

Installing the Python cx_Oracle module in Windows and connecting to an Oracle database

陌路散爱 提交于 2020-01-05 01:12:52
问题 I've been trying to get this installed and setup, and despite there been several links describing how to do this, I'm just not getting this to work. I'll describe first the setup: My PC: Windows 8.1 Enterprise (62 Bit) Remote Server: Oracle DB Version 12.1.0.2 C:\Users\Pymat\Oracle\instantclient_12_1 Here is where oraocci12.dll is located, as well as other folders and files C:\Users\Pymat\AppData\Local\Continuum\Anaconda3 Here is where the python.exe is located (i.e. os.path.dirname(sys

Return the number of affected rows from a MERGE with cx_oracle

£可爱£侵袭症+ 提交于 2020-01-04 02:07:28
问题 How can you get the number of affected rows from executing a "MERGE INTO..." sql command within CX_Oracle? When ever I execute the MERGE SQL on cx_oracle, I get a cursor.rowcount of -1. Is there a way to get the number of rows affected by the merge? 回答1: Since cx_oracle follows the python DBAPI specification (I presume), this is expected 'behaviour'. The exact same problem was discussed here on stackoverflow before. Some more links with possible solutions: http://www.oracle-developer.net

cx_Oracle: distutils.errors.DistutilsSetupError: cannot locate Oracle include files

本小妞迷上赌 提交于 2020-01-01 03:59:07
问题 I need install cx_Oracle for Python 2.5 on Linux (Linux 2.6.18-371.1.2.el5 i686). I have installed Oracle client 10.2.0.4. I have tried following: 1. Download cx_Oracle tar.gz from http://sourceforge.net/projects/cx-oracle/files/ . I don't know which of listed version are suitable for python 2.5 and Oracle client 10.2.0.4, so try cx_Oracle-5.1.tar.gz. Unpacked tar, go to unpacked folder and run python setup.py install. I got error: Traceback (most recent call last): File "setup.py", line 187,

AWS Python Lambda with Oracle - OID Generation Failed

风流意气都作罢 提交于 2019-12-31 00:39:13
问题 I'm trying to connect to an Oracle DB using AWS Lambda Python code. My code is below: import sys, os import cx_Oracle import traceback def main_handler(event, context): # Enter your database connection details here host = "server_ip_or_name" port = 1521 sid = "server_sid" username = "myusername" password = "mypassword" try: dsn = cx_Oracle.makedsn(host, port, sid) print dsn connection = cx_Oracle.Connection("%s/%s@%s" % (username, password, dsn)) cursor = connection.cursor() cursor.execute(

Cannot Insert Unicode Using cx-Oracle

半城伤御伤魂 提交于 2019-12-30 03:50:12
问题 I am having an issue inserting unicode into an Oracle schema, I think the database is an Oracle 11g instance but am not certain at this point. I'm using python 2.6.1 on OS X 10.6.8 (this is the system verison of python) and am using the cx-Oracle driver module version 5.1 downloaded from sourceforge.net, built and installed to a virtualenv 1.6.1 instance with site packages visible. My script is as follows import cx_Oracle connection = cx_Oracle.connect( "<name>/<password>@<host>/<service-name