1
+
1
2
# Installing node-oracledb Version 4.0
2
3
3
4
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.*
@@ -70,10 +71,11 @@ guaranteed to be available or usable in your environment.
70
71
71
72
#### <a name =" mig40 " ></a > 1.1 Installation Changes in node-oracledb version 4.0
72
73
73
- Node-oracledn 4.0 was refactored to use [ N-API] [ 53 ] version 2. On
74
+ Node-oracledb 4.0 was refactored to use [ N-API] [ 53 ] version 2. On
74
75
each operating system, a node-oracledb binary will work with a number
75
76
of Node.js versions from Node.js 8.16 and Node.js 10.16 onwards,
76
- dependent on N-API compatibility.
77
+ dependent on N-API compatibility. This means that when upgrading
78
+ Node.js, you may not need to reinstall node-oracledb.
77
79
78
80
If compiling from source code, the compiler no longer needs C++11
79
81
compatibility. The node-oracledb source code is now pure C.
@@ -346,7 +348,15 @@ package contents are identical in both channels. Alternatively,
346
348
multiple versions of Instant Client RPMs are available from [ Oracle
347
349
Technology Network] [ 12 ] .
348
350
349
- [ Install Instant Client Basic] [ 13 ] with sudo or as the root user:
351
+ [ Install Instant Client Basic] [ 13 ] with sudo or as the root user,
352
+ either directly from yum.oracle.com:
353
+
354
+ ```
355
+ sudo yum -y install oracle-release-el7
356
+ sudo yum -y install oracle-instantclient19.3-basic
357
+ ```
358
+
359
+ Or from a downloaded file:
350
360
351
361
```
352
362
sudo yum install oracle-instantclient19.3-basic-19.3.0.0.0-1.x86_64.rpm
@@ -677,7 +687,7 @@ Questions and issues can be posted as [GitHub Issues][10].
677
687
678
688
Review the generic [ prerequisites] ( #prerequisites ) .
679
689
680
- The pre-built binaries were built on macOS High Sierra , 10.13.6
690
+ The pre-built binaries were built on macOS Mojave , 10.14.5.
681
691
682
692
Oracle Instant Client libraries are required on macOS. There is no
683
693
native Oracle Database for macOS but one can easily be run in a Linux
@@ -720,22 +730,22 @@ and unzip it, for example:
720
730
721
731
```
722
732
mkdir -p /opt/oracle
723
- unzip instantclient-basic-macos.x64-12.2 .0.1 .0.zip
733
+ unzip instantclient-basic-macos.x64-18.1 .0.0 .0.zip
724
734
```
725
735
726
736
Create a symbolic link for the 'client shared library' in the user
727
737
default library path such as in ` ~/lib ` or ` /usr/local/lib ` . For example:
728
738
729
739
```
730
740
mkdir ~/lib
731
- ln -s instantclient_12_2 /libclntsh.dylib ~/lib/
741
+ ln -s instantclient_18_1 /libclntsh.dylib ~/lib/
732
742
```
733
743
734
744
Alternatively, copy the required OCI libraries, for example:
735
745
736
746
```
737
747
mkdir ~/lib
738
- cp instantclient_12_2 /{libclntsh.dylib.12 .1,libclntshcore.dylib.12 .1,libons.dylib,libnnz12 .dylib,libociei.dylib} ~/lib/
748
+ cp instantclient_18_1 /{libclntsh.dylib.18 .1,libclntshcore.dylib.18 .1,libons.dylib,libnnz18 .dylib,libociei.dylib} ~/lib/
739
749
```
740
750
741
751
For Instant Client 11.2, the OCI libraries must be copied. For example:
@@ -805,7 +815,7 @@ install software.
805
815
806
816
#### 3.6.2 Install Node.js
807
817
808
- Install the 64-bit Node.js MSI (e.g. node-v6.11 .0-x64 .msi) from
818
+ Install the 64-bit Node.js MSI (e.g. node-v10.16 .0-x86 .msi) from
809
819
[ nodejs.org] [ 11 ] . Make sure the option to add the Node and npm
810
820
directories to the path is selected.
811
821
@@ -844,8 +854,8 @@ Download the free 64-bit Instant Client **Basic** ZIP file from
844
854
845
855
- Unzip the ZIP file into a directory that is accessible to your
846
856
application. For example unzip
847
- ` instantclient-basic-windows.x64-18 .3.0.0.0dbru.zip ` to
848
- ` C:\oracle\instantclient_18_3 ` .
857
+ ` instantclient-basic-windows.x64-19 .3.0.0.0dbru.zip` to
858
+ ` C:\oracle\instantclient_19_3 ` .
849
859
850
860
- Add this directory to the ` PATH ` environment variable. For example
851
861
on Windows 7, update ` PATH ` in Control Panel -> System -> Advanced
@@ -862,7 +872,7 @@ Download the free 64-bit Instant Client **Basic** ZIP file from
862
872
863
873
```
864
874
REM mynode.bat
865
- SET PATH=C:\oracle\instantclient_18_3 ;%PATH%
875
+ SET PATH=C:\oracle\instantclient_19_3 ;%PATH%
866
876
node %*
867
877
```
868
878
@@ -893,6 +903,7 @@ Then set the environment variable `TNS_ADMIN` to that directory name.
893
903
#### <a name =" winredists " > </a > 3.6.6 Install the Visual Studio Redistributables
894
904
895
905
The ` PATH ` variable needs to include the appropriate VS Redistributable:
906
+ - Oracle client 19 requires the [ Visual Studio 2017 Redistributable] [ 27 ] .
896
907
- Oracle client 18 and 12.2 require the [ Visual Studio 2013 Redistributable] [ 27 ] .
897
908
- Oracle client 12.1 requires the [ Visual Studio 2010 Redistributable] [ 27 ] .
898
909
- Oracle client 11.2 requires the [ Visual Studio 2005 Redistributable] [ 29 ] .
@@ -953,7 +964,7 @@ install software.
953
964
954
965
#### 3.7.2 Install Node.js
955
966
956
- Install the 64-bit Node.js MSI (e.g. node-v10.15.3 -x64.msi) from
967
+ Install the 64-bit Node.js MSI (e.g. node-v10.16.0 -x64.msi) from
957
968
[ nodejs.org] [ 11 ] . Make sure the option to add the Node and npm
958
969
directories to the path is selected.
959
970
@@ -1032,18 +1043,18 @@ Python 2.7 is needed by node-gyp.
1032
1043
#### 3.9.2 Install Node.js
1033
1044
1034
1045
Download [ Node.js] [ 11 ] for AIX on Power Systems. For
1035
- example, if you downloaded version 6.11 .0 you could install Node.js
1046
+ example, if you downloaded version 10.16 .0 you could install Node.js
1036
1047
into ` /opt ` :
1037
1048
1038
1049
```
1039
1050
cd /opt
1040
- gunzip -c node-v6.11 .0-aix-ppc64.tar.gz | tar -xvf -
1051
+ gunzip -c node-v10.16 .0-aix-ppc64.tar.gz | tar -xvf -
1041
1052
```
1042
1053
1043
1054
Set ` PATH ` to include Node.js:
1044
1055
1045
1056
```
1046
- export PATH=/opt/node-v6.11 .0-aix-ppc64/bin:$PATH
1057
+ export PATH=/opt/node-v10.16 .0-aix-ppc64/bin:$PATH
1047
1058
```
1048
1059
1049
1060
#### 3.9.3 Install the add-on
@@ -1085,15 +1096,15 @@ and extract it into a directory that is accessible to your
1085
1096
application, for example ` /opt/oracle ` :
1086
1097
1087
1098
```
1088
- unzip instantclient-basic-aix.ppc64-12.2 .0.1.0 .zip
1099
+ unzip instantclient-basic-aix.ppc64-19.3 .0.0.0dbru .zip
1089
1100
mkdir -p /opt/oracle
1090
- mv instantclient_12_2 /opt/oracle
1101
+ mv instantclient_19_3 /opt/oracle
1091
1102
```
1092
1103
1093
1104
To run applications, you will need to set the link path:
1094
1105
1095
1106
```
1096
- export LIBPATH=/opt/oracle/instantclient_12_2 :$LIBPATH
1107
+ export LIBPATH=/opt/oracle/instantclient_19_3 :$LIBPATH
1097
1108
```
1098
1109
1099
1110
#### 3.9.5 Optionally create the default Oracle Client configuration directory
@@ -1104,7 +1115,7 @@ If you intend to co-locate optional Oracle configuration files such as
1104
1115
` network/admin ` subdirectory. Create this if needed. For example:
1105
1116
1106
1117
```
1107
- sudo mkdir -p /opt/oracle/instantclient_12_2 /network/admin
1118
+ sudo mkdir -p /opt/oracle/instantclient_19_3 /network/admin
1108
1119
```
1109
1120
1110
1121
This is the default Oracle configuration directory for applications
@@ -1206,13 +1217,13 @@ application, for example `/opt/oracle`:
1206
1217
1207
1218
```
1208
1219
cd /opt/oracle
1209
- unzip instantclient-basic-solaris.x64-12.2 .0.1.0 .zip
1220
+ unzip instantclient-basic-solaris.x64-18.3 .0.0.0dbru .zip
1210
1221
```
1211
1222
1212
1223
To run applications, you will need to set the link path:
1213
1224
1214
1225
```
1215
- export LD_LIBRARY_PATH_64=/opt/oracle/instantclient_12_2 :$LD_LIBRARY_PATH_64
1226
+ export LD_LIBRARY_PATH_64=/opt/oracle/instantclient_18_3 :$LD_LIBRARY_PATH_64
1216
1227
```
1217
1228
1218
1229
#### 3.9.5 Optionally create the default Oracle Client configuration directory
@@ -1223,7 +1234,7 @@ If you intend to co-locate optional Oracle configuration files such as
1223
1234
` network/admin ` subdirectory. Create this if needed. For example:
1224
1235
1225
1236
```
1226
- mkdir -p /opt/oracle/instantclient_12_2 /network/admin
1237
+ mkdir -p /opt/oracle/instantclient_18_3 /network/admin
1227
1238
```
1228
1239
1229
1240
This is the default Oracle configuration directory for applications
@@ -1398,10 +1409,11 @@ versions do not have to be the same on different computers, but
1398
1409
node-oracledb behavior and features may then differ.
1399
1410
1400
1411
The destination computer's ` PATH ` needs to include Visual Studio
1401
- Redistributables. If you have Oracle client 18 or 12.2, install the Visual
1402
- Studio 2013 Redistributable. For Oracle client 12.1 install the Visual
1403
- Studio 2010 Redistributable. For Oracle client 11.2 install the Visual
1404
- Studio 2005 Redistributable.
1412
+ Redistributables. If you have Oracle client 19 install the Visual
1413
+ Studio 2017 Redistributable. If you have Oracle client 18 or 12.2,
1414
+ install the Visual Studio 2013 Redistributable. For Oracle client
1415
+ 12.1 install the Visual Studio 2010 Redistributable. For Oracle
1416
+ client 11.2 install the Visual Studio 2005 Redistributable.
1405
1417
1406
1418
You can also find out the Redistributable required by locating the
1407
1419
library ` OCI.DLL ` on the source computer and running:
@@ -1574,15 +1586,6 @@ If `npm install oracledb` fails:
1574
1586
- Try running ` npm cache clean -f ` and deleting the
1575
1587
` node_modules/oracledb ` directory.
1576
1588
1577
- If ` require('oracledb') ` fails:
1578
-
1579
- - Do you have multiple copies of Node.js installed? Did the correct
1580
- ` npm ` and ` node-gyp ` get invoked?
1581
-
1582
- - Did you get * Error: Module version mismatch* or * Error: Module
1583
- did not self-register* ? You must rebuild node-oracledb when you
1584
- upgrade Node.js.
1585
-
1586
1589
If creating a connection fails:
1587
1590
1588
1591
- If you got * DPI-1047: Cannot locate an Oracle Client library* ,
@@ -1608,8 +1611,8 @@ If creating a connection fails:
1608
1611
expected version first in ` PATH ` (on Windows) or ` LD_LIBRARY_PATH `
1609
1612
(on Linux)?
1610
1613
1611
- - On macOS, did you install Oracle Instant Client in ` ~/lib ` or
1612
- ` /usr/local/lib ` ?
1614
+ - On macOS, did you install Oracle Instant Client libraries in ` ~/lib `
1615
+ or ` /usr/local/lib ` ?
1613
1616
1614
1617
Issues and questions about node-oracledb can be posted on [ GitHub] [ 10 ] or
1615
1618
[ Slack] [ 48 ] ([ link to join Slack] [ 49 ] ).
0 commit comments