140 questions
1
vote
1
answer
339
views
pythono-oracledb thick mode fail: libaio.so.1: cannot open shared object file
I have FastAPI app, and its Dockerfile looks like this:
FROM python:3.12-slim
# Oralce dep
WORKDIR /opt/oracle
RUN apt-get update && apt-get install -y iputils-ping wget unzip libaio1
RUN wget ...
2
votes
2
answers
71
views
CLOB attribute of a oracle record type is taking 0.5 seconds for each update using python (both with oracledb and cx_oracle library)
I'm trying to update the CLOB attribute of a record type created using below script. I have 40,000 CLOB items, which I'm updating into 40,000 record type DB_TYPE_OBJECT via python code. Each record ...
0
votes
1
answer
144
views
cryptography and pyinstaller (not using Fernet) error
I'm using pyinstaller main2.spec command. The main2.spec file is the next:
# -*- mode: python ; coding: utf-8 -*-
a = Analysis(
['main.py'],
pathex=[],
binaries=[],
datas=[
('./...
0
votes
1
answer
79
views
Unable to access oracledb package using python in ODI14c Marketplace
I am facing issue in ODI14c Marketplace, while connecting to Oracle database using Python script. Error is, 'ObjectNotFound'. when i go and see, i can find oracledb package at location python3.8.
...
1
vote
1
answer
89
views
JSON direct binding in Thin mode make a JSON column unreadable by any clients
Problems
When using the "python-oracledb" client in Thin mode to store JSON data by direct binding, there is a problem with JSON type columns not being displayed on various clients.
...
0
votes
3
answers
84
views
Pass comma delimited values as bind variable value to oracledb cursor
I have a query wherein it has in clause.
e.g.
select * from table where column1 in ('value1', 'value2', 'value3');
I want to execute this query with list of (value1, value2 and value3, valueN) could ...
0
votes
0
answers
21
views
Error Connecting to Oracle Data Warehouse DW2_DEV: Unsupported Password Verifier Type in Python-oracledb Thin Mode [duplicate]
Description:
I am attempting to connect to the DW2_DEV database within our Oracle data warehouse using Python 3.11 and the oracledb library version 3.1.1. While I can successfully connect to the ...
0
votes
1
answer
357
views
python-oracledb fails when initializing thick mode in Docker
I am trying to initialize python-oracledb in Thick Mode. It works on my Mac M1 Pro, but when I try to containerize my application with Docker, I get DPI-1047: Cannot locate a 64-bit Oracle Client ...
1
vote
2
answers
92
views
Why is my flask application taking soo long to connect to the Oracle database from PCF?
So, i have been stuck with the connection timeouts happening from the PCF server.
I am using oracledb.connect() and i'm fetching the role from the database.
Until I restart the application in PCF it ...
0
votes
1
answer
68
views
Pandas - decimal.InvalidOperation: [<class 'decimal.ConversionSyntax'>] during read_sql
I am running an extraction of a table in Python using Pandas. I am getting this output:
PS: The extraction works with other tables, this is happening with a specific one, but it's not the first time I ...
-1
votes
1
answer
75
views
Clone data with new table in oracle using pandas
I am trying to clone SCOTT.EMP table with TEST table. However datatypes are not matching.
Please advise how to create a clone of EMP with new Table "TEST" with Same datatype in python pandas....
1
vote
1
answer
224
views
Executing and retrieving stored procedure returns in python with oracle db
I am trying to run
plsql = """
DECLARE
l_zip BLOB;
BEGIN
l_zip := apex_export.zip( ...
0
votes
1
answer
67
views
ETL from excel file to oracle database with same defined table
I’m working on a project where I need to automatically extract data from an Excel file and load it into an Oracle database. I’m using Python, TOAD, Oracle Client, and VS Code. The goal is to trigger ...
0
votes
1
answer
41
views
Call oracledb Connection.gettype from SQLAlchemy.AssyncSession
Have an async connection pool in FastApi application.
Using python-oracledb async connection pool (thin mode).
Trying to call Connection.gettype(name)
(await (await session.connection())....
-1
votes
1
answer
182
views
In python: oracledb.connect simply hangs, even when the local client succeeds. Why?
I am trying to connect to an Oracle DB using the oracledb connection library and when I try it It simply hangs on with oracledb.connect even when following the documentation.
Here is the sample code. ...
0
votes
0
answers
9
views
Getting error while connecting to a oracle database from Science logic tool [duplicate]
I am getting the below error while trying to connect a oracle database from science logic tool.. What could be done to resolve this please..?
DPY-3015: password verifier type 0x939 is not supported by ...
0
votes
1
answer
62
views
ImportError for venv/lib64/python3.9/site-packages/oracledb/base_impl.cpython-39-x86_64-linux-gnu.so
I have a Django app that runs fine under runsslserver, but when I run it under Apache, the traffic gets to the app, but 'import oracledb' fails. I was using cx_Oracle previously (which also threw an ...
1
vote
1
answer
125
views
python-oracledb how to change arraysize for session
Stack:
oracledb==2.5.1
sqlalchemy==2.0.25
fastapi==0.105.0
How can I change Cursor's arraysize for a session? I Know how to set arraysize on createengine and it works for all connections in the pool
...
0
votes
0
answers
25
views
Flask app DB module avoiding circular import
I'm trying to avoid circular import at my Flask app (based on oracledb), but get "RuntimeError: Database pool not initialized". How can I properly handle the DB pool creation (create without ...
0
votes
2
answers
51
views
bind parameters by array index
I'm trying to migrate from cx_Oracle 8.1.0 to oracledb 2.5.1 library. Before such query was working:
update command_center set
E_ID = :1,
E_ASPECTS = :2,
...
0
votes
0
answers
62
views
Create table on Oracle using file created within the Python script
In my Python script, I have created a set of SQL statements in an output file. I would like to create a table using these SQL statements as my final output table on Oracle rather than run these SQLs ...
0
votes
0
answers
135
views
Python 3.8 | cx_Oracle 8.3.0 OR python-oracledb | executemany with batcherrors = True not working
I am using python 3.8 and cx_Oracle 8.3.0.
I am using executemany with batcherrors=True but it is not working at all.
executemany is just raising an exception for the error occurred at first place and ...
0
votes
1
answer
423
views
Python : Not able to connect to oracle db ORA-12537: TNS:connection closed
I am trying to connect to oracle database in mac system.
My team generally works on Java so for development. we generally do this to connect to db in java. We connect to ssh tunnel which allows us to ...
3
votes
1
answer
4k
views
Python using oracledb to connect to Oracle database with Pandas DataFrame Error: "pandas only supports SQLAlchemy connectable (engine/connection)"
I am pretty new to Python and even newer to Pandas and am hoping for some guidance
My company has an on-prem DEV Oracle database that I am trying to connect to using Python & Pandas. After some ...
0
votes
2
answers
522
views
Connecting to Oracle SQL Database From Python Without cx-oracle
I need to run a SQL script from python (Jupyter) and need to connect to an existing Oracle database for the same. I am trying to automate the process, as the output of the SQL will serve as input for ...
0
votes
1
answer
59
views
dsnless connection using oracledb
Using VBA I can make a dsnless connection to oracle in the following way.
Driver={Oracle in OraClient21Home1};DBQ=<<string_returned_from_tnsping>>;User Id=fake_user;Password=fake_password;
...
0
votes
1
answer
775
views
Oracledb thick mode/encryption with flask-sqlalchemy
I have a Flask app that uses Flask-SQLAlchemy and the python-oracledb driver to interface with an Oracle database. I am attempting to run oracledb in thick mode so that I can enforce encryption ...
0
votes
1
answer
1k
views
Python-oracledb: DPY-6005: cannot connect to database (CONNECTION_ID=""). DPY-3008: unsupported in-band notification with error number 12572
I'm trying to connect to an Oracle database in Python using SQLAlchemy together with OracleDB. But I always get this error:
sqlalchemy.exc.OperationalError: (oracledb.exceptions.OperationalError) DPY-...
0
votes
2
answers
254
views
Pandas read_sql with SQLAlchemy from Oracle Database with many parameters
I have a working setup to read sql data into a pandas dataframe:
connect_string = f"DSN={config.DB};UID={credentials['UID']};PWD={credentials['pwd']};DBQ={config.DB_server};DBA=W;APA=T;EXC=F;FEN=...
-1
votes
2
answers
391
views
DPY-3008: unsupported in-band notification with error number 2396
I run a SQL query with a python script. i use python-oracledb library. same script works for other queries without error. i run query on Toad. there is no problem or error. i check the search engines ...
0
votes
1
answer
81
views
Python cx_oracle concurrent fetch
When using Python cx_Oracle - we set a parameter cursor.arraysize = 10000. I am assuming that this means the Python client running on the server receives data "sequentially" in batches of ...
0
votes
0
answers
156
views
Cannot get thick client on python oracledb working. Finds libclntsh.so - but fails at libnnz11.so
This is my python script.
import oracledb
import os
import sys
os.environ['ORACLE_HOME'] = "/home/ec2-user/linux_oracle_client"
os.environ['LD_LIBRARY_PATH'] = "/home/ec2-user/...
1
vote
2
answers
108
views
SQL command works fine when run manually (SQL Developer) but gives ORA-00922 in Python's oracledb module
I am working with an Oracle SQL database, and I would like to run the command
ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD';
It works fine when I run it from the SQL Developer app manually. ...
0
votes
0
answers
94
views
data migration (georeferenced data) from oracle to postgres
First, the Python code should connect to an Oracle database and store the retrieved data using the pandas library. Then, a connection to the relevant PostgreSQL database will be established. A table ...
2
votes
2
answers
295
views
Issue selecting table in database using oracledb python module and local Oracle 21c database
I installed a local database and used SQL Developer to create a test table.
Database connection works, also the table is created and populated;
example here
Running this example code in Python throws ...
0
votes
1
answer
140
views
Send a rowtype variable to a procedure using oracledb
I have oracle package ETL_RUN, in the package there is a procedure which is declared like this:
procedure pRunTask(pTask in out nocopy TASK_RUN%rowtype)
I am trying to call the procedure from Python ...
0
votes
1
answer
506
views
Error in Direct Binding of JSON Data with python-oracledb Library on Oracle Database 23ai
I tried to load JSON data using direct binding as described in this example. I encountered the error oracledb.exceptions.NotSupportedError: DPY-3002: Python value of type "dict" is not ...
0
votes
0
answers
493
views
python-oracledb on AWS Lambda Windows issue
I have a task to connect to an AWS RDS Oracle server and retrieve information using lambda layer. I have been working on this issue for almost two days. I discovered a lightweight Oracle database ...
0
votes
0
answers
197
views
Python App connection to Oracle Autonomous Database
I have an Python application that connects to an Oracle Autonomous database. This application was working correctly until I had to migrate my Oracle Autonomous database from 23c to 23ai.
The app ...
1
vote
0
answers
361
views
Is there a way to connect to an oracle database with ldap using python-oracledb in thin mode?
I am trying to connect to an oracle database using the python oracledb library.
On looking at the docs it seems like python-oracledb doesn't have ldap support for thin mode. Is there a workaround for ...
0
votes
1
answer
214
views
select from DUAL python sqlalchemy ORM
I have a custom function on oracle database called create_identifier. It acccept a string and a column and concatenate the abbreviated form of the string to the column.
I am trying to get the python ...
2
votes
1
answer
635
views
Failed to connect Superset to Oracle Database [closed]
Hi, i try to install superset with docker on ubuntu, but when i tried to connect with my oracle database i get this error. i already add RUN pip install cx_Oracle ini Dockerfile but still not work.
...
1
vote
1
answer
580
views
Using Python Great Expectations and python-oracledb
I would like to set up an oracledb as a datasource but can't get the syntax. Is this even possible?
import oracledb
from sqlalchemy import create_engine
import getpass
username = getpass.getuser()
...
0
votes
1
answer
187
views
How can I pass a variable from CSV file to Oracle SQL query fetch in Python?
I have the following piece of code where I read a csv file and connect to the database. then I want to pass two columns from CSV file as variable to my query and eventually convert the result to a pd ...
0
votes
1
answer
302
views
Trying to connect oracle db to the django application using wallet.zip file
I'm configuring my Oracle database to the django application using wallet.zip file in the following way.
Note: This wallet.zip file contains tnsnames.ora file.
In settings.py file:
DATABASES = {
...
2
votes
0
answers
619
views
Connecting aws glue with oracledb (using python-oracledb lib)
Summary:-
we are pulling data from a oracledb performing a few operations and finally writing it back to oracledb in aws glue.
While writing back to the oracledb we had to use the update statements ...
0
votes
1
answer
163
views
How can I call/reach "gettype()" from oracledb connection through objects defined in "django.db"?
I have a small Django application with an Oracle DB as database.
I use "Django 5.0.3" with "oracledb 2.0.1".
In "oracledb" library the object "connection" has a ...
0
votes
1
answer
162
views
How to pass a array object to an oracle stored procedure?
how to pass the array object?
Here I have connected the Oracle DB through Python by using the Oracledb library
#DB connection
connection = oracledb.connect(user="hr", password=userpwd,dsn=&...
1
vote
1
answer
2k
views
Apache Airflow and Oracle Connection
I am trying to read data from a local oracle database (Oracle Database 11g Release 11.2.0.4.0 - 64bit Production).
I have created my own docker image:
# Use the base Apache Airflow image
FROM apache/...
1
vote
2
answers
919
views
Is it possible bind variables by name AND position in Oracle SQL?
When executing an Oracle SQL query from an application using a driver like python-oracledb, it is possible to bind variables by name or by position. Binding variables by name uses named arguments, and ...