@@ -164,10 +164,10 @@ Since a single cx_Oracle binary can use different client versions and
164164also access multiple database versions, it is important your
165165application is tested in your intended release environments. Newer
166166Oracle clients support new features, such as the `oraaccess.xml
167- <http ://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-9D12F489-EC02-46BE-8CD4-5AECED0E2BA2> `__ external configuration
167+ <https ://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-9D12F489-EC02-46BE-8CD4-5AECED0E2BA2> `__ external configuration
168168file available with 12.1 or later clients, session pool improvements,
169169improved high availability features, call timeouts, and `other enhancements
170- <http ://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-D60519C3-406F-4588-8DA1-D475D5A3E1F6> `__.
170+ <https ://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-D60519C3-406F-4588-8DA1-D475D5A3E1F6> `__.
171171
172172The cx_Oracle function :func: `~cx_Oracle.clientversion() ` can be used
173173to determine which Oracle Client version is in use and the attribute
@@ -200,7 +200,7 @@ Install cx_Oracle
200200-----------------
201201
202202The generic way to install cx_Oracle on Linux is to use Python's `Pip
203- <http ://pip.readthedocs.io/en/latest/installing/> `__ package to
203+ <https ://pip.readthedocs.io/en/latest/installing/> `__ package to
204204install cx_Oracle from `PyPI
205205<https://pypi.org/project/cx-Oracle/> `__:
206206
@@ -267,7 +267,7 @@ To use cx_Oracle with Oracle Instant Client zip files:
267267
268268 mkdir -p /opt/oracle
269269 cd /opt/oracle
270- unzip instantclient-basic-linux.x64-19.6 .0.0.0dbru.zip
270+ unzip instantclient-basic-linux.x64-19.9 .0.0.0dbru.zip
271271
272272 3. Install the ``libaio `` package with sudo or as the root user. For example::
273273
@@ -284,14 +284,14 @@ To use cx_Oracle with Oracle Instant Client zip files:
284284
285285 .. code-block :: shell
286286
287- sudo sh -c " echo /opt/oracle/instantclient_19_6 > /etc/ld.so.conf.d/oracle-instantclient.conf"
287+ sudo sh -c " echo /opt/oracle/instantclient_19_9 > /etc/ld.so.conf.d/oracle-instantclient.conf"
288288 sudo ldconfig
289289
290290 Alternatively, set the environment variable ``LD_LIBRARY_PATH `` to
291291 the appropriate directory for the Instant Client version. For
292292 example::
293293
294- export LD_LIBRARY_PATH=/opt/oracle/instantclient_19_6 :$LD_LIBRARY_PATH
294+ export LD_LIBRARY_PATH=/opt/oracle/instantclient_19_9 :$LD_LIBRARY_PATH
295295
2962965. If you use optional Oracle configuration files such as ``tnsnames.ora ``,
297297 ``sqlnet.ora `` or ``oraaccess.xml `` with Instant Client, then put the files
@@ -306,7 +306,7 @@ To use cx_Oracle with Oracle Instant Client zip files:
306306 Or set the environment variable ``TNS_ADMIN `` to that directory name.
307307
308308 Alternatively, put the files in the ``network/admin `` subdirectory of Instant
309- Client, for example in ``/opt/oracle/instantclient_19_6 /network/admin ``.
309+ Client, for example in ``/opt/oracle/instantclient_19_9 /network/admin ``.
310310 This is the default Oracle configuration directory for executables linked
311311 with this Instant Client.
312312
@@ -321,10 +321,12 @@ To use cx_Oracle with Oracle Instant Client RPMs:
321321 <https://www.oracle.com/database/technologies/instant-client/linux-x86-32-downloads.html> `__, matching your
322322 Python architecture.
323323
324- Oracle's yum server has `Instant Client RPMs for Oracle Linux 7
325- <http://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/index.html> `__
324+ Oracle's yum server has `Instant Client RPMs for Oracle Linux 8
325+ <https://yum.oracle.com/repo/OracleLinux/OL8/oracle/instantclient/x86_64/index.html> `__,
326+ `Instant Client RPMs for Oracle Linux 7
327+ <https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/index.html> `__
326328 and `Instant Client RPMs for Oracle Linux 6
327- <http ://yum.oracle.com/repo/OracleLinux/OL6/oracle/instantclient/x86_64/index.html> `__
329+ <https ://yum.oracle.com/repo/OracleLinux/OL6/oracle/instantclient/x86_64/index.html> `__
328330 that can be downloaded without needing a click-through.
329331
330332 The latest version is recommended. Oracle Instant Client 19 will
@@ -334,7 +336,7 @@ To use cx_Oracle with Oracle Instant Client RPMs:
334336
335337 .. code-block :: shell
336338
337- sudo yum install oracle-instantclient19.6 -basic-19.6 .0.0.0-1.x86_64.rpm
339+ sudo yum install oracle-instantclient19.9 -basic-19.9 .0.0.0-1.x86_64.rpm
338340
339341 Yum will automatically install required dependencies, such as ``libaio ``.
340342
@@ -373,7 +375,7 @@ To use cx_Oracle with Oracle Instant Client RPMs:
373375 Or set the environment variable ``TNS_ADMIN `` to that directory name.
374376
375377 Alternatively, put the files in the ``network/admin `` subdirectory of Instant
376- Client, for example in ``/usr/lib/oracle/19.6 /client64/lib/network/admin ``.
378+ Client, for example in ``/usr/lib/oracle/19.9 /client64/lib/network/admin ``.
377379 This is the default Oracle configuration directory for executables linked
378380 with this Instant Client.
379381
@@ -414,7 +416,7 @@ Installing cx_Oracle RPMs on Oracle Linux
414416=========================================
415417
416418Python and cx_Oracle RPM packages are available from the `Oracle Linux yum server
417- <http ://yum.oracle.com/> `__. Various versions of Python are easily installed.
419+ <https ://yum.oracle.com/> `__. Various versions of Python are easily installed.
418420Using the yum server makes it easy to keep up to date.
419421
420422Installation instructions are at `Oracle Linux for Python
@@ -428,7 +430,7 @@ Installing cx_Oracle on Windows
428430Install cx_Oracle
429431-----------------
430432
431- Use Python's `Pip <http ://pip.readthedocs.io/en/latest/installing/ >`__
433+ Use Python's `Pip <https ://pip.readthedocs.io/en/latest/installing/ >`__
432434package to install cx_Oracle from `PyPI
433435<https://pypi.org/project/cx-Oracle/> `__::
434436
@@ -485,10 +487,22 @@ To use cx_Oracle with Oracle Instant Client zip files:
485487
4864882. Unzip the package into a directory that is accessible to your
487489 application. For example unzip
488- ``instantclient-basic-windows.x64-19.6 .0.0.0dbru.zip `` to
489- ``C:\oracle\instantclient_19_6 ``.
490+ ``instantclient-basic-windows.x64-19.8 .0.0.0dbru.zip `` to
491+ ``C:\oracle\instantclient_19_8 ``.
490492
491- 3. There are several alternative ways to tell cx_Oracle where your Oracle Client
493+ 3. Oracle Instant Client libraries require a Visual Studio redistributable with
494+ a 64-bit or 32-bit architecture to match Instant Client's architecture.
495+ Each Instant Client version requires a different redistributable version:
496+
497+ - For Instant Client 19 install `VS 2017 <https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads >`__.
498+ - For Instant Client 18 or 12.2 install `VS 2013 <https://support.microsoft.com/en-us/kb/2977003#bookmark-vs2013 >`__
499+ - For Instant Client 12.1 install `VS 2010 <https://support.microsoft.com/en-us/kb/2977003#bookmark-vs2010 >`__
500+ - For Instant Client 11.2 install `VS 2005 64-bit <https://www.microsoft.com/en-us/download/details.aspx?id=18471 >`__ or `VS 2005 32-bit <https://www.microsoft.com/en-ca/download/details.aspx?id=3387 >`__
501+
502+ Configure Oracle Instant Client
503+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
504+
505+ 1. There are several alternative ways to tell cx_Oracle where your Oracle Client
492506 libraries are, see :ref: `initialization `.
493507
494508 * With Oracle Instant Client you can use :meth: `~cx_Oracle.init_oracle_client() `
@@ -497,7 +511,7 @@ To use cx_Oracle with Oracle Instant Client zip files:
497511 .. code-block :: python
498512
499513 import cx_Oracle
500- cx_Oracle.init_oracle_client(lib_dir = r " C:\o racle\i nstantclient_19_6 " )
514+ cx_Oracle.init_oracle_client(lib_dir = r " C:\o racle\i nstantclient_19_8 " )
501515
502516 Note a 'raw' string is used because backslashes occur in the path.
503517
@@ -509,35 +523,27 @@ To use cx_Oracle with Oracle Instant Client zip files:
509523 is executed, for example::
510524
511525 REM mypy.bat
512- SET PATH=C:\oracle\instantclient_19_6 ;%PATH%
526+ SET PATH=C:\oracle\instantclient_19_8 ;%PATH%
513527 python %*
514528
515529 Invoke this batch file every time you want to run Python.
516530
517- 4. Oracle Instant Client libraries require a Visual Studio redistributable with
518- a 64-bit or 32-bit architecture to match Instant Client's architecture.
519- Each Instant Client version requires a different redistributable version:
520-
521- - For Instant Client 19 install `VS 2017 <https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads >`__.
522- - For Instant Client 18 or 12.2 install `VS 2013 <https://support.microsoft.com/en-us/kb/2977003#bookmark-vs2013 >`__
523- - For Instant Client 12.1 install `VS 2010 <https://support.microsoft.com/en-us/kb/2977003#bookmark-vs2010 >`__
524- - For Instant Client 11.2 install `VS 2005 64-bit <https://www.microsoft.com/en-us/download/details.aspx?id=18471 >`__ or `VS 2005 32-bit <https://www.microsoft.com/en-ca/download/details.aspx?id=3387 >`__
525-
526- 5. If you use optional Oracle configuration files such as ``tnsnames.ora ``,
531+ 2. If you use optional Oracle configuration files such as ``tnsnames.ora ``,
527532 ``sqlnet.ora `` or ``oraaccess.xml `` with Instant Client, then put the files
528533 in an accessible directory, for example in
529534 ``C:\oracle\your_config_dir ``. Then use:
530535
531536 .. code-block :: python
532537
533538 import cx_Oracle
534- cx_Oracle.init_oracle_client(config_dir = r " C:\o racle\y our_config_dir" )
539+ cx_Oracle.init_oracle_client(lib_dir = r " C:\o racle\i nstantclient_19_8" ,
540+ config_dir = r " C:\o racle\y our_config_dir" )
535541
536542 Or set the environment variable ``TNS_ADMIN `` to that directory name.
537543
538544 Alternatively, put the files in a ``network\admin `` subdirectory of
539545 Instant Client, for example in
540- ``C:\oracle\instantclient_19_6 \network\admin ``. This is the default
546+ ``C:\oracle\instantclient_19_8 \network\admin ``. This is the default
541547 Oracle configuration directory for executables linked with this
542548 Instant Client.
543549
@@ -571,21 +577,19 @@ Installing cx_Oracle on macOS
571577Install Python
572578--------------
573579
574- Make sure you are not using a bundled Python. These have restricted
580+ Make sure you are not using the bundled Python. This has restricted
575581entitlements and will fail to load Oracle client libraries. Instead use
576582`Homebrew <https://brew.sh >`__ or `Python.org
577583<https://www.python.org/downloads> `__.
578584
579- Note Instant Client 19 and earlier are not supported on macOS 10.15 Catalina.
580- You will need to allow access to several Instant Client libraries from the
581- Security & Privacy preference pane.
582-
583585Install cx_Oracle
584586-----------------
585587
586- Use Python's `Pip <http ://pip.readthedocs.io/en/latest/installing/ >`__
588+ Use Python's `Pip <https ://pip.readthedocs.io/en/latest/installing/ >`__
587589package to install cx_Oracle from `PyPI
588- <https://pypi.org/project/cx-Oracle/> `__::
590+ <https://pypi.org/project/cx-Oracle/> `__:
591+
592+ .. code-block :: shell
589593
590594 python -m pip install cx_Oracle --upgrade
591595
@@ -605,94 +609,73 @@ installed.
605609Install Oracle Instant Client
606610-----------------------------
607611
608- cx_Oracle requires Oracle Client libraries, which are found in Oracle
609- Instant Client for macOS. These provide the necessary network
610- connectivity allowing cx_Oracle to access an Oracle Database instance.
612+ Oracle Instant Client provides the network connectivity for accessing Oracle
613+ Database.
611614
612- To use cx_Oracle with Oracle Instant Client zip files:
615+ Manual Installation
616+ +++++++++++++++++++
613617
614- 1. Download the Oracle 19, 18, 12 or 11.2 "Basic" or "Basic Light" zip file from `here
615- <https://www.oracle.com/database/technologies/instant-client/macos-intel-x86-downloads.html> `__.
616- Choose either a 64-bit or 32-bit package, matching your
617- Python architecture.
618+ * Download the **Basic ** 64-bit DMG from `Oracle
619+ <https://www.oracle.com/database/technologies/instant-client/macos-intel-x86-downloads.html> `__.
618620
619- The latest version is recommended. Oracle Instant Client 19 will
620- connect to Oracle Database 11.2 or later.
621+ * In Finder, double click on the DMG to mount it.
621622
622- 2. Unzip the package into a single directory that is accessible to your
623- application. For example, in Terminal you could unzip in your home directory:
623+ * Open a terminal window and run the install script in the mounted package, for example:
624624
625- .. code-block :: shell
626-
627- cd ~
628- unzip instantclient-basic-macos.x64-19.3.0.0.0dbru.zip
625+ .. code-block :: shell
629626
630- This will create a directory `` /Users/your_username/instantclient_19_3 ``.
627+ /Volumes/instantclient-basic-macos.x64-19.8.0.0.0dbru/install_ic.sh
631628
632- 3. There are several alternative ways to tell cx_Oracle where your Oracle
633- Instant Client libraries are, see :ref: `initialization `.
629+ This copies the contents to ``$HOME/Downloads/instantclient_19_8 ``.
634630
635- * You can use :meth: `~cx_Oracle.init_oracle_client() ` in your
636- application:
631+ * In Finder, eject the mounted Instant Client package.
637632
638- .. code-block :: python
639-
640- import cx_Oracle
641- cx_Oracle.init_oracle_client(lib_dir = " /Users/your_username/instantclient_19_3" )
633+ If you have multiple Instant Client DMG packages mounted, you only need to run
634+ ``install_ic.sh `` once. It will copy all mounted Instant Client DMG packages at
635+ the same time.
642636
643- * Alternatively, locate the directory with the cx_Oracle module binary and
644- link or copy Oracle Instant Client to that directory. For example, if you
645- installed cx_Oracle with ``--user `` in Python 3.8, then
646- ``cx_Oracle.cpython-38-darwin.so `` might be in
647- ``~/Library/Python/3.8/lib/python/site-packages ``. You can then run
648- ``ln -s ~/instantclient_19_3/libclntsh.dylib
649- ~/Library/Python/3.8/lib/python/site-packages `` or copy the Instant Client
650- libraries to that directory.
637+ Scripted Installation
638+ +++++++++++++++++++++
651639
652- * Alternatively, you can set ``DYLD_LIBRARY_PATH `` to the directory
653- containing Oracle Instant Client, however this needs to be set in each
654- terminal or process that invokes Python. The variable will not propagate
655- to sub-shells.
640+ Instant Client installation can alternatively be scripted, for example:
656641
657- * Alternatively, on older versions of macOS, you could add a link to
658- ``$HOME/lib `` or ``/usr/local/lib `` to enable applications to find Instant
659- Client. If the ``lib `` sub-directory does not exist, you can create
660- it. For example:
661-
662- .. code-block :: shell
642+ .. code-block :: shell
663643
664- mkdir ~ /lib
665- ln -s ~ /instantclient_19_3/libclntsh.dylib ~ /lib/
644+ cd $HOME /Downloads
645+ curl -O https://download.oracle.com/otn_software/mac/instantclient/198000/instantclient-basic-macos.x64-19.8.0.0.0dbru.dmg
646+ hdiutil mount instantclient-basic-macos.x64-19.8.0.0.0dbru.dmg
647+ /Volumes/instantclient-basic-macos.x64-19.8.0.0.0dbru/install_ic.sh
648+ hdiutil unmount /Volumes/instantclient-basic-macos.x64-19.8.0.0.0dbru
666649
667- Instead of linking, you can copy the required OCI libraries. For example:
650+ The Instant Client directory will be `` $HOME/Downloads/instantclient_19_8 ``.
668651
669- .. code-block :: shell
670652
671- mkdir ~ /lib
672- cp ~ /instantclient_19_3/{libclntsh.dylib.19.1,libclntshcore.dylib.19.1,libnnz19.dylib,libociei.dylib} ~ /lib/
653+ Configure Oracle Instant Client
654+ -------------------------------
673655
674- For Instant Client 11.2, the OCI libraries must be copied. For example :
656+ 1. Call :meth: ` ~cx_Oracle.init_oracle_client() ` once in your application :
675657
676- .. code-block :: shell
658+ .. code-block :: python
677659
678- mkdir ~ /lib
679- cp ~ /instantclient_11_2/{libclntsh.dylib.11.1,libnnz11.dylib,libociei.dylib} ~ /lib/
660+ import cx_Oracle
661+ cx_Oracle.init_oracle_client( lib_dir = " /Users/your_username/Downloads/instantclient_19_8 " )
680662
681- 4 . If you use optional Oracle configuration files such as ``tnsnames.ora ``,
663+ 2 . If you use optional Oracle configuration files such as ``tnsnames.ora ``,
682664 ``sqlnet.ora `` or ``oraaccess.xml `` with Oracle Instant Client, then put the
683665 files in an accessible directory, for example in
684666 ``/Users/your_username/oracle/your_config_dir ``. Then use:
685667
686668 .. code-block :: python
687669
688670 import cx_Oracle
689- cx_Oracle.init_oracle_client(config_dir = " /Users/your_username/oracle/your_config_dir" )
671+ cx_Oracle.init_oracle_client(lib_dir = " /Users/your_username/Downloads/instantclient_19_8" ,
672+ config_dir = " /Users/your_username/oracle/your_config_dir" )
690673
691674 Or set the environment variable ``TNS_ADMIN `` to that directory name.
692675
693676 Alternatively, put the files in the ``network/admin `` subdirectory of Oracle
694677 Instant Client, for example in
695- ``/Users/your_username/instantclient_19_3 /network/admin ``. This is the
678+ ``/Users/your_username/Downloads/instantclient_19_8 /network/admin ``. This is the
696679 default Oracle configuration directory for executables linked with this
697680 Instant Client.
698681
@@ -861,7 +844,7 @@ If using cx_Oracle fails:
861844 - On Windows, if you used :meth: `~cx_Oracle.init_oracle_client() ` and have
862845 a full database installation, make sure this database is the `currently
863846 configured database
864- <http ://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-33D575DD-47FF-42B1-A82F-049D3F2A8791> `__.
847+ <https ://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-33D575DD-47FF-42B1-A82F-049D3F2A8791> `__.
865848 - On Windows, if you are not using
866849 :meth: `~cx_Oracle.init_oracle_client() `, then restart your command prompt
867850 and use ``set PATH `` to check the environment variable has the correct
0 commit comments