This tag doesn't currently have an excerpt. Help contribute by writing one
Questions tagged [python-oracledb]
68 questions
5
votes
1 answer
Does python-oracledb thin mode have any performance implications compared to the thick mode?
cx_Oracle was renamed to python-oracledb in the May 2022 release. It now comes with two modes, thin and thick. Thick mode uses the Oracle client libraries to connect to Oracle, while thin mode can connect directly. cx_Oracle previously always…

Matthew Moisen
- 16,701
- 27
- 128
- 231
4
votes
0 answers
How to fix the error 'DPY-4001: no password specified' of oracledb in python
I am trying to connect oracle DB, using the package 'oracledb'. But I can see the below error that states.
Error
File "C:\Users\userid\Anaconda3\lib\site-packages\oracledb\errors.py", line 103, in _raise_err
raise exc_type(_Error(message)) from…

Kevin Tracey
- 154
- 1
- 16
3
votes
2 answers
Error Connecting virtual machine to oracle, using python (error DPY-4011)
I'm using the oracledb library to connect my python application to an oracle database. I can connect normally using python on my computer, but I have a virtual machine, running Ubuntu, which is using the same network as the computer, that cannot…

Arthur Perin
- 41
- 1
- 6
3
votes
1 answer
With python-oracledb what does 'DPY-4027: no configuration directory to search for tnsnames.ora' mean
With the python-oracledb driver the code:
import oracledb
cs = "MYDB"
c = oracledb.connect(user='cj', password=mypw, dsn=cs)
gives the error:
oracledb.exceptions.DatabaseError: DPY-4027: no configuration directory to search for tnsnames.ora
The…

Christopher Jones
- 9,449
- 3
- 24
- 48
2
votes
1 answer
Why is the outconverter not called for byte conversions in oracledb/cx_Oracle (Python)?
I am trying to fetch SDO_GEOMETRY typed columns from an Oracle database using Python (3.11) and the oracledb library (1.3.0). I want to use an outputtypehandler to convert the SDO_GEOMETRY instances into pickle encoded bytes. This works fine for…

Jannis
- 23
- 4
2
votes
0 answers
Why is cursor.rowcount higher than the number of rows returned by cursor.fetchall in oracledb but not in cx_Oracle?
I am using the oracledb Python package to query a table in an Oracle database. When calling cursor.fetchall() (or cursor.fetchmany() in batches), the cursor.rowcount attribute is higher than the actual number of rows returned. However, this issue…

agrvz
- 21
- 2
2
votes
2 answers
What does 'DPY-6005: cannot connect to database. Connection failed with "[Errno 61] Connection refused"' mean with python-oracledb
On macOS with Python 3.9.6 the Python code using Oracle's python-oracledb driver:
import oracledb
import os
un = os.environ.get("PYTHON_USERNAME")
pw = os.environ.get("PYTHON_PASSWORD")
cs = "localhost/orclpdb1"
c = oracledb.connect(user=un,…

Christopher Jones
- 9,449
- 3
- 24
- 48
2
votes
1 answer
What does 'DPY-6001: cannot connect to database' mean with python-oracledb?
With Python code that uses the
python-oracledb driver:
import oracledb
import os
un = os.environ.get("PYTHON_USERNAME")
pw = os.environ.get("PYTHON_PASSWORD")
cs = "localhost/doesnotexist"
c = oracledb.connect(user=un, password=pw, dsn=cs)
what…

Christopher Jones
- 9,449
- 3
- 24
- 48
1
vote
1 answer
python-oracledb timeout makes program close out
I have a function which is supposed to retrieve the ddl as well as the indeces for a specific table from a database. Most of the time this works find, however it seems like for some specific tables I get timeouts when this function is called. To…

jwlkns
- 11
- 3
1
vote
0 answers
Multiple bind variables with custom types in oracledb Python
So, I'm working in a project that haves multiple output vars for stored procedures, but the types of the vars are custom, with oracledb library to declare the output bind variable you have to call:
cursor.var(oracledb.OBJECT,…

abvega
- 33
- 3
1
vote
1 answer
I am trying to install cx_Oracle in VS code and getting the error Microsoft Visual C++ 14.0 or greater is required
Collecting cx-oracle
Using cached cx_Oracle-8.3.0.tar.gz (363 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages:…

yes
- 11
- 3
1
vote
2 answers
In Django when i passed a query to insert a row, in Oracle Db the row is being inserted twice in the table
@api_view(['PUT'])
def updateRule1(request, id):
nums15 = 'OK'
json_data = json.loads(request.body)
# print(json_data)
con = None
cur = None
try:
con = cx_Oracle.connect('')
cur =…

Viven
- 13
- 3
1
vote
1 answer
NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:oracle.oracledb
When I Try to connect oracle server with SQLAlchemy. I'm getting this error.
NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:oracle.oracledb
from sqlalchemy.engine import create_engine
DIALECT = 'oracle'
SQL_DRIVER = 'oracledb'
USERNAME =…

ThunderCloud
- 41
- 1
- 5
1
vote
3 answers
DPY-3015: password verifier type 0x939 is not supported by python-oracledb in thin mode
I am trying to connect python and oracle db but I cannot downolad any clients as there is no internet connection.
I am using oracledb for that but I am getting this error. Any clue about how to solve it without downolading anything ?
Thank you!

Michaella
- 25
- 2
- 6
1
vote
0 answers
DPY-4011: the database or network closed the connection
I am using Oracle 11.2.0, Python 3.10.3
I am trying to connect to a Infor Oracle database with the following script:
import oracledb
TEST="'xxxx':'XXX'/'XXX'"
with oracledb.connect(user="xxx", password="xxx", dsn=TEST, disable_oob=True)
it…

Matteo Baldazzi
- 11
- 2