@@ -185,8 +185,10 @@ To run ODPI-C applications with Oracle Instant Client zip files:
185
185
``sqlnet.ora `` or ``oraaccess.xml ``, put the files in an accessible
186
186
directory. Then set the member
187
187
:member: `dpiContextCreateParams.oracleClientConfigDir ` when calling
188
- :func: `dpiContext_createWithParams() `, or set the environment variable
189
- ``TNS_ADMIN `` to that directory name.
188
+ :func: `dpiContext_createWithParams() `.
189
+
190
+ Alternatively, set the environment variable ``TNS_ADMIN `` to that directory
191
+ name.
190
192
191
193
Alternatively, create a ``network/admin `` subdirectory of Instant Client, if
192
194
it does not exist. For example::
@@ -248,8 +250,10 @@ To run ODPI-C applications with Oracle Instant Client RPMs:
248
250
``sqlnet.ora `` or ``oraaccess.xml ``, put the files in an accessible
249
251
directory. Then set the member
250
252
:member: `dpiContextCreateParams.oracleClientConfigDir ` when calling
251
- :func: `dpiContext_createWithParams() `, or set the environment variable
252
- ``TNS_ADMIN `` to that directory name.
253
+ :func: `dpiContext_createWithParams() `.
254
+
255
+ Alternatively, set the environment variable ``TNS_ADMIN `` to that directory
256
+ name.
253
257
254
258
Alternatively, create a ``network/admin `` subdirectory of Instant Client, if
255
259
it does not exist. For example::
@@ -348,42 +352,46 @@ To run ODPI-C applications with Oracle Instant Client zip files:
348
352
``instantclient-basic-windows.x64-19.6.0.0.0dbru.zip `` to
349
353
``C:\oracle\instantclient_19_6 ``.
350
354
351
- 3. Either set this directory in the member
352
- :member: `dpiContextCreateParams.oracleClientLibDir ` when calling
353
- :func: `dpiContext_createWithParams() `, or do the following.
355
+ 3. There are several alternative ways to tell your application where your Oracle
356
+ Instant Client libraries are.
354
357
355
- Add this directory to the ``PATH `` environment variable. For example, on
356
- Windows 7, update ``PATH `` in Control Panel -> System -> Advanced System
357
- Settings -> Advanced -> Environment Variables -> System Variables -> PATH.
358
- The Instant Client directory must occur in ``PATH `` before any other Oracle
359
- directories.
358
+ * Set this directory in the member
359
+ :member: `dpiContextCreateParams.oracleClientLibDir ` when calling
360
+ :func: `dpiContext_createWithParams() `.
360
361
361
- Restart any open command prompt windows.
362
+ * Alternatively, move the unzipped Instant Client files to the same
363
+ directory as the ODPIC.DLL (or into the directory of the application's
364
+ binary, if ODPI-C is compiled into the application).
365
+
366
+ * Alternatively, add the Instant Client directory to the ``PATH ``
367
+ environment variable. For example, on Windows 7, update ``PATH `` in
368
+ Control Panel -> System -> Advanced System Settings -> Advanced ->
369
+ Environment Variables -> System Variables -> PATH. The Instant Client
370
+ directory must occur in ``PATH `` before any other Oracle directories.
362
371
363
- To avoid interfering with existing tools that require other Oracle
364
- Client versions, instead of updating the system-wide ``PATH `` variable, you
365
- may prefer to write a batch file that sets ``PATH ``, for example::
372
+ Restart any open command prompt windows.
366
373
367
- REM mywrapper.bat
368
- SET PATH=C:\oracle\instantclient_19_6;%PATH%
369
- myapp %*
374
+ To avoid interfering with existing tools that require other Oracle Client
375
+ versions, instead of updating the system-wide `` PATH `` variable, you may
376
+ prefer to write a batch file that sets `` PATH ``, for example::
370
377
371
- Invoke this batch file everytime you want to run your application.
378
+ REM mywrapper.bat
379
+ SET PATH=C:\oracle\instantclient_19_6;%PATH%
380
+ myapp %*
372
381
373
- Alternatively use ``SET `` to change your ``PATH `` in each command
374
- prompt window before you run python.
382
+ Invoke this batch file every time you want to run your application.
375
383
376
- Another option is to move the unzipped Instant Client files to the
377
- same directory as the ODPIC.DLL (or into the directory of the
378
- application's binary, if ODPI-C is compiled into application). If
379
- you do this, then ``PATH `` does not need to be set.
384
+ Or simply use ``SET `` to change your ``PATH `` in each command prompt window
385
+ before you run your application.
380
386
381
387
4. If you use optional Oracle configuration files such as ``tnsnames.ora ``,
382
388
``sqlnet.ora `` or ``oraaccess.xml ``, put the files in an accessible
383
389
directory. Then set the member
384
390
:member: `dpiContextCreateParams.oracleClientConfigDir ` when calling
385
- :func: `dpiContext_createWithParams() `, or set the environment variable
386
- ``TNS_ADMIN `` to that directory name.
391
+ :func: `dpiContext_createWithParams() `.
392
+
393
+ Alternatively, set the environment variable ``TNS_ADMIN `` to that directory
394
+ name.
387
395
388
396
Alternatively, create a ``network\admin `` subdirectory of Instant Client, if
389
397
it does not exist. For example ``C:\oracle\instantclient_19_6\network\admin ``.
@@ -445,42 +453,72 @@ To run ODPI-C applications with Oracle Instant Client zip files:
445
453
application architecture. Most applications use 64-bit.
446
454
447
455
2. Unzip the package into a single directory that is accessible to your
448
- application. For example, in Terminal you could unzip in your home directory::
456
+ application. For example, in Terminal you could unzip:
457
+
458
+ .. code-block :: shell
449
459
450
- cd ~
451
- unzip instantclient-basic-macos.x64-19.3.0.0.0dbru.zip
460
+ mkdir /opt/oracle
461
+ cd /opt/oracle
462
+ unzip /your/path/to/instantclient-basic-macos.x64-19.3.0.0.0dbru.zip
463
+
464
+ 3. There are several alternative ways to tell your application where your Oracle
465
+ Instant Client libraries are.
466
+
467
+ * Use the extracted directory for the member
468
+ :member: `dpiContextCreateParams.oracleClientLibDir ` in a call to
469
+ :func: `dpiContext_createWithParams() `
470
+
471
+ * Alternatively, copy Oracle Instant Client to the directory containing the
472
+ ODPI-C module binary. For example, if ``libodpic.dylib `` (or your binary
473
+ containing the ODPI-C code) is in ``~/myprograms `` you can then run ``ln -s
474
+ ~/instantclient_19_3/libclntsh.dylib ~/myprograms ``. You can also copy the
475
+ Instant Client libraries to that directory.
476
+
477
+ * Alternatively, set ``DYLD_LIBRARY_PATH `` to the Instant Client directory. Note this
478
+ variable does not propagate to sub-shells.
479
+
480
+ * Alternatively, you might decide to compile the ODPI-C library with an RPATH
481
+ option like ``-Wl,-rpath,/usr/local/lib ``. Then you can link Oracle
482
+ Instant Client to this directory, for example::
452
483
453
- 3. Either use this directory as the member
454
- :member: `dpiContextCreateParams.oracleClientLibDir ` is specified when calling
455
- :func: `dpiContext_createWithParams() `, or do the following.
484
+ ln -s /opt/oracle/instantclient_19_3/libclntsh.dylib /usr/local/lib/
456
485
457
- Add a link to ``$HOME/lib `` or ``/usr/local/lib `` to enable applications to
458
- find Instant Client. If the ``lib `` sub-directory does not exist, you can
459
- create it. For example::
486
+ Or, instead of a link you can copy the required OCI libraries. For example::
460
487
461
- mkdir ~/lib
462
- ln -s ~/instantclient_19_3/libclntsh.dylib ~/lib/
488
+ cp /opt/oracle/instantclient_19_3/{libclntsh.dylib.19.1,libclntshcore.dylib.19.1,libons.dylib,libnnz12.dylib,libociei.dylib} /usr/local/lib/
463
489
464
- If you now run ``ls -l ~/lib/libclntsh.dylib `` you will see something like::
490
+ * Alternatively, on older versions of macOS, you could add a link to
491
+ ``$HOME/lib `` or ``/usr/local/lib `` to enable applications to find Instant
492
+ Client. If the ``lib `` sub-directory does not exist, you can create
493
+ it. For example:
465
494
466
- lrwxr-xr-x 1 yourname staff 48 12 Nov 15:04 /Users/yourname/lib/libclntsh.dylib -> /Users/yourname/instantclient_19_3/libclntsh.dylib
495
+ .. code-block :: shell
467
496
468
- Alternatively, copy the required OCI libraries. For example::
497
+ mkdir ~ /lib
498
+ ln -s ~ /instantclient_19_3/libclntsh.dylib ~ /lib/
469
499
470
- mkdir ~/lib
471
- cp ~/instantclient_19_3/{libclntsh.dylib.19.1,libclntshcore.dylib.19.1,libons.dylib,libnnz12.dylib,libociei.dylib} ~/lib/
500
+ Instead of linking, you can copy the required OCI libraries. For example:
472
501
473
- For Instant Client 11.2, the OCI libraries must be copied. For example::
502
+ .. code-block :: shell
474
503
475
- mkdir ~/lib
476
- cp ~/instantclient_11_2/{libclntsh.dylib.11.1,libnnz11.dylib,libociei.dylib} ~/lib/
504
+ mkdir ~ /lib
505
+ cp ~ /instantclient_19_3/{libclntsh.dylib.19.1,libclntshcore.dylib.19.1,libnnz19.dylib,libociei.dylib} ~ /lib/
506
+
507
+ For Instant Client 11.2, the OCI libraries must be copied. For example:
508
+
509
+ .. code-block :: shell
510
+
511
+ mkdir ~ /lib
512
+ cp ~ /instantclient_11_2/{libclntsh.dylib.11.1,libnnz11.dylib,libociei.dylib} ~ /lib/
477
513
478
514
4. If you use optional Oracle configuration files such as ``tnsnames.ora ``,
479
515
``sqlnet.ora `` or ``oraaccess.xml ``, put the files in an accessible
480
516
directory. Then set the member
481
517
:member: `dpiContextCreateParams.oracleClientConfigDir ` when calling
482
- :func: `dpiContext_createWithParams() `, or set the environment variable
483
- ``TNS_ADMIN `` to that directory name.
518
+ :func: `dpiContext_createWithParams() `.
519
+
520
+ Alternatively, set the environment variable ``TNS_ADMIN `` to that directory
521
+ name.
484
522
485
523
Alternatively, create a ``network/admin `` subdirectory of Instant Client, if
486
524
it does not exist. For example::
0 commit comments