How to Install the Oracle Database Client for ArcGIS?

2649
0
11-30-2022 02:09 PM
Labels (3)
MarceloMarques
Esri Regular Contributor
1 0 2,649

arcgis.jpg         oracle.png

- Introduction

Connect to Oracle from ArcGIS—ArcGIS Pro | Documentation

Connect to Oracle from ArcGIS—ArcGIS Server | Documentation for ArcGIS Enterprise

Connect to Oracle from ArcGIS—ArcMap | Documentation

- Important​

ArcMap/ArcCatalog - use 32-bits Oracle Client

Pro/Portal/Server - use the 64-bits Oracle Client

- Tips

- use SQL Plus to test the connection !!!

- Oracle releases the updates for the Oracle Client in Jan / Apr / Jul / Oct to resolved bugs and security vulnerabilities, hence is import that you keep the Oracle Client updated.

- It is recommended that you use an Oracle Client Version that matches the Oracle Database Version, e.g. if Oracle Database is 19c then use the latest version of the Oracle Instant Client 19c or if using the Oracle Full Client then make sure to install the latest patchset.

- After you install the Oracle Instant Client and you set the Windows System PATH Environment Variable to include the Oracle Instant Client folder then you must close/open ArcGIS Desktop (ArcMap/ArcCatalog), ArcGIS Pro and stop/start the ArcGIS Server Windows Service, only then ArcGIS will know about the changes in the PATH Environment Variable for the Oracle Instant Client folder.

- You also need to install the Oracle Instant Client on your ArcGIS Enterprise machine for ArcGIS Server to be able to connect to the Oracle Geodatabase, and as mentioned above you must stop/start the ArcGIS Server Windows Service, only then ArcGIS Server will know about the changes in the PATH Environment Variable for the Oracle Instant Client folder.

- Oracle Instant Client

Instant Client for Microsoft Windows (x64) 64-bit (oracle.com)

Instant Client for Windows 32-bit (oracle.com)

Video https://youtu.be/ni_j8Rfp0J0 - Oracle 19c Instant Client     !!!video has no audio!!!

installation instructions

Download and install the correct Visual Studio Redistributable from Microsoft. 

Instant Client 21 requires the Visual Studio 2017 Redistributable.

Instant Client 19 requires the Visual Studio 2017 redistributable

Instant Client 18 and 12.2 require the Visual Studio 2013 redistributable

Instant Client 12.1 requires the Visual Studio 2010 redistributable.

- Oracle Full Client

Video https://youtu.be/d7hRCootD9Y - Oracle 19c Full Client      !!! video has no audio!!!

---------------------------------------------------------------

--Oracle Client Enable Windows Authentication Protocol
https://www.oracle.com/database/technologies/faq-instant-client.html
/*
How do I ensure that my Oracle Net files like "tnsnames.ora" and "sqlnet.ora" are being used in Instant Client?
Files like "tnsnames.ora", "sqlnet.ora" and "oraaccess.xml" will be located by Instant Client by setting the TNS_ADMIN environment variable or registry entry to the directory containing the files.
Use the full directory path; do not include a file name.
Alternatively create a subdirectory "network/admin" under the Instant Client directory for the Oracle Net files. This is the default location and so no TNS_ADMIN variable is required.
*/
--under $ORACLE_CLIENT_HOME/network/admin create a file named sqlnet.ora and add this line to enable windows authentication and save the file

SQLNET.AUTHENTICATION_SERVICES = (NTS)

/*
--example:  sqlnet.ora created under oracle instant client 64-bits (Pro) and 32-bits (ArcMap)
C:\oracle\instantclient_19_6\x32\network\admin
C:\oracle\instantclient_19_6\x64\network\admin

--cmd window, verify PATH variable
echo %PATH%
... ;C:\oracle\instantclient_19_6\x64;C:\oracle\instantclient_19_6\x32; ...
*/

/*
ORA-12638: credential retrieval failed
Workaround if using Oracle Instant Client 19.15
add these lines to sqlnet.ora on client machine:
SQLNET.AUTHENTICATION_SERVICES= (NTS)
SQLNET.NO_NTLM=FALSE
*/

 --Note: Oracle Database Administrator needs to create a login with external authentication in the database for the user to be able to connect via Windows Authentication.

For more best practices see: Mapping and Charting Solutions (MCS) Enterprise Databases Best Practices

About the Author
| Marcelo Marques | Principal Product Engineer | Esri | Cloud & Database Administrator | OCP - Oracle Certified Professional | 30 years experience | www.linkedin.com/in/mmarquesbr | I have worked with Esri Technology since 1992 and I have been working with Enterprise Geodatabases since 1997 when the Geodatabase was first released. | " a successful Enterprise ArcGIS application deployment starts with a strong physical database design and best database administration practices" | " I do not fear computers. I fear the lack of them." - Isaac Asimov |