odpi | ODPI-C : Oracle Database Programming Interface for Drivers | Database library
kandi X-RAY | odpi Summary
kandi X-RAY | odpi Summary
Oracle Database Programming Interface for C (ODPI-C) is an open source library of C code that simplifies access to Oracle Database for applications written in C or C++. It is a wrapper over Oracle Call Interface (OCI) that makes applications and language interfaces easier to develop. ODPI-C supports basic and advanced features of Oracle Database and Oracle Client. See the homepage for a list.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of odpi
odpi Key Features
odpi Examples and Code Snippets
Community Discussions
Trending Discussions on odpi
QUESTION
I am trying to package a python application using pyinstaller. I am using cx_oracle and the oracle instant client to connect to an oracle database. I am working on Windows 10. My application works fine before I package it. But after packaging, the following error occurs when I try to run the executable file:
cx_Oracle.DatabaseError: DPI-1072: the Oracle Client library version is unsupported
This error occurs in the line cx_Oracle.init_oracle_client(lib_dir=r"instantclient_19_9")
. According to the ODPI log, the Oracle Instant Client is loaded successfully, but while validating, the error occurs.
The problem is not due to a different Oracle Instant Client version on the system. I have checked for other versions on the systems, but there are none. Also, when I remove the Oracle Instant Client that I am trying to load, a different error occurrs, which says that not Oracle Instant client was found.
When I package the application while mocking or omitting the database connection, the packaging works fine.
I have tried everything on two separate systems, on which I experience the same issues. Another person could reproduce my issues as well. Also, I can replicate this error with the following toy example:
There needs to be no Oracle database present. The Oracle Instant Client needs to be installed into the folder where the following file is located.
...ANSWER
Answered 2021-Feb-22 at 02:32Triple check the correct Oracle client is being loaded. Set the environment variable DPI_DEBUG_LEVEL to 64 before starting Python. (See the cx_Oracle Initialization documentation). This will show how cx_Oracle is looking for the Instant Client libraries, and will let you make sure there is no other (older) oci.dll somewhere on the computer that is being used.
Check you are on a supported OS version (i.e not Windows 7).
Check you have all the Instant Client libraries (obviously you don't need JDBC files): https://docs.oracle.com/en/database/oracle/oracle-database/19/lnoci/instant-client.html#GUID-6895DB45-97AA-4738-9959-BD677D610186
Make sure the computer has the correct VS Redistributable installed.
QUESTION
I'm trying to test if superset would be adecuate for our data visualization needs. As I've no knowledge of python, I'm using a docker image of a superset installation (v0.37.1) published with all the libraries needed to connect to different databases (https://github.com/amancevice/docker-superset). When I try to set up a new database source to an Oracle database I get this error in the superset.log:
...ANSWER
Answered 2020-Sep-25 at 02:48When you download Oracle Instant Client Basic or Basic Light ZIP packages from here, then run something like this in your Dockerfile:
QUESTION
I'm fetching a row from oracle database using ODPI-C in C++ and NUMBER(19,0) type appears to be double, so in some cases the field value comes corrupted (e.g. in db viewer shows 5187413295700304461 but after fetch it's transformed into 5.1874132957002998e+18 which is not quite correct).
Reading the field value is done by
...ANSWER
Answered 2020-Jul-09 at 08:13Rows can be fetch using dpiVar*
s. Simply before dpiStmt_fetch
I defined dpi_Var* using this call
QUESTION
I'm trying to build a Docker image with cx_Oracle.
Here is the Dockerfile I'm using :
...ANSWER
Answered 2020-Jun-28 at 23:33With RPMs prior to 19c, you need to update the system library search path when you install Instant Client RPMs. The recommended way is to use ldconfig
as shown in Oracle's sample 18c Dockerfile:
QUESTION
I am trying to connect to Oracle DB to node JS. SQL developer is already installed and working successfully, SQL developer is connected to server database using tnsnames.ora file. But when i try to run below code
...ANSWER
Answered 2020-May-02 at 22:17The reason SQL Developer does not complain about the same problem as your node.js app is SQL Developer is using a pure Java JDBC driver to connect to the database. The JDBC thin driver is entirely written in Java and is included in the installation of the product "SQL Developer".
You should get a similar error message if you ask SQL Developer to connect to the database using a thick driver (OCI library)
There are situations where you will need the thick driver to connect in SQL Developer. This link will explain when: https://www.thatjeffsmith.com/archive/2019/04/sql-developer-19-1-connections-thick-or-thin/
Your node.js oracledb module requires a client side library (OCI) in order to connect to the database so please download and install an oracle instant client before any connections are tried.
Best of luck
QUESTION
I'm trying to establish a simple database connection to run a sql query from an express/node app and when I hit my endpoint, I see the following error:
...ANSWER
Answered 2020-Apr-23 at 13:37The oracle 'oracledb' driver (node-oracledb) requires the Oracle client to connect to the database.
You can find the Oracle client at https://www.oracle.com/database/technologies/instant-client.html
QUESTION
I have error "cx_Oracle.DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library: "libclntsh.so: cannot open shared object file: No such file or directory". See https://oracle.github.io/odpi/doc/installation.html#linux for help"
I saw https://oracle.github.io/odpi/doc/installation.html#oracle-instant-client-zip and How to fix: cx_Oracle.DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library - Python
I always work on Windows and only learing on Linux system. I need help for this issue. Connect to Oracle from python:
...ANSWER
Answered 2020-Apr-22 at 09:41Problem solved. Maybe It will be hlepfully: download rpm(oracle-instantclient12.2-basic, oracle-instantclient12.2-devel, oracle-instantclient12.2-devel).
of course, needs only oracle-instantclient12.2
QUESTION
I can't find proper way to get count of rows returned after successful execution of SELECT statement via ODPI-C.
Hope you can help me.
EDITED: There is a function
...ANSWER
Answered 2020-Apr-06 at 23:07This is not ODPI-C specific. Oracle Database doesn't provide this automatically on SELECT statements. You have to fetch the rows and then count them. Or run 'SELECT COUNT'.
QUESTION
I'm trying to execute simple sql query using ODPI-C
...ANSWER
Answered 2020-Mar-27 at 21:36The DDL statement should not have a semicolon at the end. That is a client statement separator, not part of the statement. Change it to:
QUESTION
I am trying to establish a connection from a Jupyter Notebook using the following Python code:
...ANSWER
Answered 2020-Feb-17 at 21:51I strongly expect you'll need to install the Oracle client libraries before starting Jupyter, because the OS library search path needs to contain the client library directory, and you can't set this inside a running process. The ODPI-C link does contain the steps you need to follow. You can install the latest Instant Client ZIP or RPM "Basic" package.
The cx_Oracle installation manual is here: https://cx-oracle.readthedocs.io/en/latest/user_guide/installation.html#installing-cx-oracle-on-linux
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install odpi
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page