cx_Oracle module for built-in Python

5640
4
Jump to solution
09-11-2012 01:19 PM
DawenXie
New Contributor III
We used to have ArcGIS for Server 10.0 (Java version) installed. We manually compliled a 32-bit cx_Oracle module for the built-in Python 2.6 and we had some geo processing tools using cx_Oracle to connect to our Oracle Database directly.

Recently We upgraded our server to 10.1 (Linux) and ran into a problem in compling cx_Oracle module for the built-in Phthon 2.7. The difficulties are different than those under 10.0: ArcGIS is now running python under wine.

Anyone has experience on doing similar installation? Any suggestion would be appreciated!
0 Kudos
1 Solution

Accepted Solutions
DawenXie
New Contributor III
Since I got a few inquiries on this, it would be helpful to post it here.

The trick is to load the cx_Oracle.pyd (from a Windows 7 64-bit machine) and 64-bit Windows Oracle Instant Client's .dll files into a specific folder on the Linux server. It should be the site-packages directory of python27, something like:

/data/ags/arcgis/server/framework/runtime/.wine/drive_c/Python27/ArcGISx6410.1/Lib/site-packages

Below are the files I copied:

[SNIPPED]

-rw-r--r--  1 root   root      134144 2012-09-13 15:57 cx_Oracle.pyd
-rw-r--r--  1 root   root      357888 2012-09-26 18:10 orasql11.dll
-rw-r--r--  1 root   root   140233216 2012-09-26 18:10 oraociei11.dll
-rw-r--r--  1 root   root     1235456 2012-09-26 18:10 oraocci11.dll
-rw-r--r--  1 root   root     1600000 2012-09-26 18:10 orannzsbb11.dll
-rw-r--r--  1 root   root      481792 2012-09-26 18:10 ociw32.dll
-rw-r--r--  1 root   root      137728 2012-09-26 18:10 ocijdbc11.dll
-rw-r--r--  1 root   root      683008 2012-09-26 18:10 oci.dll

Forgot to provide a followup on this: we got a solution after working with ESRI support for more than a week. I can provide more details if someone runs into the same issue. Contact me through message.

Two software enhancement requests were logged that related to this:

[#NIM085268  Enhance ArcGIS server 10.1 for Linux to better handle GP service based on python script that involves custom modules and database connection client ]

[#NIM085267  Enhancement request: Put Linux based Python with ArcGIS server 10.1 on Linux.  ]

View solution in original post

0 Kudos
4 Replies
DawenXie
New Contributor III
Forgot to provide a followup on this: we got a solution after working with ESRI support for more than a week. I can provide more details if someone runs into the same issue. Contact me through message.

Two software enhancement requests were logged that related to this:

[#NIM085268  Enhance ArcGIS server 10.1 for Linux to better handle GP service based on python script that involves custom modules and database connection client ]

[#NIM085267  Enhancement request: Put Linux based Python with ArcGIS server 10.1 on Linux.  ]
0 Kudos
DawenXie
New Contributor III
Since I got a few inquiries on this, it would be helpful to post it here.

The trick is to load the cx_Oracle.pyd (from a Windows 7 64-bit machine) and 64-bit Windows Oracle Instant Client's .dll files into a specific folder on the Linux server. It should be the site-packages directory of python27, something like:

/data/ags/arcgis/server/framework/runtime/.wine/drive_c/Python27/ArcGISx6410.1/Lib/site-packages

Below are the files I copied:

[SNIPPED]

-rw-r--r--  1 root   root      134144 2012-09-13 15:57 cx_Oracle.pyd
-rw-r--r--  1 root   root      357888 2012-09-26 18:10 orasql11.dll
-rw-r--r--  1 root   root   140233216 2012-09-26 18:10 oraociei11.dll
-rw-r--r--  1 root   root     1235456 2012-09-26 18:10 oraocci11.dll
-rw-r--r--  1 root   root     1600000 2012-09-26 18:10 orannzsbb11.dll
-rw-r--r--  1 root   root      481792 2012-09-26 18:10 ociw32.dll
-rw-r--r--  1 root   root      137728 2012-09-26 18:10 ocijdbc11.dll
-rw-r--r--  1 root   root      683008 2012-09-26 18:10 oci.dll

Forgot to provide a followup on this: we got a solution after working with ESRI support for more than a week. I can provide more details if someone runs into the same issue. Contact me through message.

Two software enhancement requests were logged that related to this:

[#NIM085268  Enhance ArcGIS server 10.1 for Linux to better handle GP service based on python script that involves custom modules and database connection client ]

[#NIM085267  Enhancement request: Put Linux based Python with ArcGIS server 10.1 on Linux.  ]
0 Kudos
BillDaigle
Occasional Contributor III
This for posting Dawen.  This is exactly what we needed to get up and running.
0 Kudos
BillDaigle
Occasional Contributor III

Has anyone out there had luck using cx_Oracle on ArcGIS Server for Linux 10.2+? 

We are in the process of upgrading from 10.1 to 10.5 and we can 't seem to get cx_Oracle to connect to our Oracle database. The suggestion above worked on our 10.1 server, but not on 10.5.  We put in a ticket with ESRI, but they referenced the following documented bug (documented at 10.2) and said that the cx_Oracle is supported by ArcGIS server for Linux. 

NIM096269 - The Python implementation provided with ArcGIS for Server on Linux is unstable when running geoprocessing scripts which leverages the 3rd party cx_Oracle module.

We have a number of geoprocesses that rely heavily on cx_Oracle and I'd like avoid rewriting them. 

0 Kudos