Windows Connect to Oracle Database

Source: Internet
Author: User

I thought it was simple, and I found some pits.

1. Installing Cx_oracle

Pip Install Cx_oracle

2. Download Instantclient

Then unzip the oci.dll copy to the $python_home or $Python _home\lib\site-packages directory, note must be consistent version, otherwise will be reported Importerror:dll load failed: The specified module could not be found.

3. Although this is possible to use cx_oracle, but the actual operation of the database may appear cx_Oracle.InterfaceError:Unable to acquire Oracle environment handle this error, The solution is to copy Oci.dll, Oraociei12.dll, Oraocci12.dll to Site-package. Another way is to set the environment variable for INSTANTCLIENT12C so that you don't have to copy the DLL file.

Reference Blog

http://blog.csdn.net/longxj04/article/details/64922138

Windows Connect to Oracle Database

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.