oracle

python-oracledb module fails to use instantclient in a docker container

python-oracledb module fails to use instantclient in a docker container Question: I’m trying to build a docker image to access an oracle database at runtime, I’m having the following error message: DPI-1047: Cannot locate a 64-bit Oracle Client library: "/oracle/instantclient/libclntsh.so: cannot open shared object file: No such file or directory". Inside the container, there actually …

Total answers: 3

Get data from MS Access and insert into Oracle SQL

Get data from MS Access and insert into Oracle SQL Question: I’m creating a Python code that retrieves data from an MS Access table and inserts it into an Oracle SQL table, but I’m having problems with the execute function of the Oracle cursor when using INSERT INTO statement. When I run the code, the …

Total answers: 1

analytical functions

analytical functions Question: good afternoon, a question, how can I optimize the code, I don’t know, maybe using oracle analytical functions : — tabledeuda : this table contains 2 months 202212 and 202211 SELECT B.*, NVL(B.DEUDAPRESTAMO_PAGPER,0)-NVL(A.DEUDAPRESTAMO_PAGPER,0) AS SALE_CT — current month – previous month FROM tabledeuda B LEFT JOIN tabledeuda A ON (A.CODLLAVE = B.CODLLAVE …

Total answers: 1

How can I insert data from csv to database? I'm getting multiple errors (python)

How can I insert data from csv to database? I'm getting multiple errors (python) Question: Here’s my full code. import cx_Oracle, pandas as pd connstr="spark/pass@localhost:1521/orcl" conn = cx_Oracle.connect(connstr) curs = conn.cursor() csv = pd.read_csv(‘C:/Users/user/Downloads/products.csv’) lst = csv.values.tolist() t = tuple(lst) #Here where I tried to insert values to DB curs.executemany("INSERT INTO PRODUCTS(number, date, code, price) …

Total answers: 2

Passing a Date variable to a sql query with python

Passing a Date variable to a sql query with python Question: I´m trying to write a sql query in python, where I want the user to pass a date, saved in a variable. Then I want this to be processed in the query. While it´s pretty easy to do so in R, I´m curious if …

Total answers: 2

futex() syscall timed out during python trying to connect remote oracle db

futex() syscall timed out during python trying to connect remote oracle db Question: I’m executing following python code to connect to remote DB server, I can see the syscalls getting timed out at the following location, so it take unusually high time to connect to the DB. How ever after like 10 seconds script connects …

Total answers: 1

python-oracledb thin client returns DPY-6005

python-oracledb thin client returns DPY-6005 Question: I’m trying to connect to a 21c ATP and 19c ADP (free tier, ACL enabled/configured with "My Address", TLS enabled (mTLS set to "Not required"), connection string contains "ssl_server_dn_match=yes") using Python’s thin client but at the point of making a connection or setting up a connection pool, I get: …

Total answers: 1

Freezing/hanging when executing Oracle DB PL/SQL procedure in Python

Freezing/hanging when executing Oracle DB PL/SQL procedure in Python Question: Hello I created a PLSQL procedure to update or insert quantity in inventory table based on product Id and new inward qty. Below is my PLSQL procedure and it works fine when i try in sql developer. But when i trying to execute this in …

Total answers: 1

how do i access one record from query results in python

how do i access one record from query results in python Question: hi i have this query and its result i was trying to access record by record at a time but im not able to select_migration_db = "SELECT B.rmt_n, A.prr_id, A.rp_ID FROM mo_TRAC A, T_sft_init_prr B WHERE A.rp_id=B.int_prr_id AND A.STATUS=’Sc’ AND A.PHASE=’first’ AND A.WAVE=’first’" …

Total answers: 2