Difficulty running script on server w/ Oracle OLE DB connection; Error 000732

1545
10
08-21-2017 05:50 AM
Brownschuh
Occasional Contributor II

I recently wrote a python script to take CAMA data from an Oracle database in the Assessors' office and update a table on our enterprise geodatabase; basically just taking property ownership information from one table and updating it daily in another so we can consume it in our GIS system.  At first, I tested on my desktop machine where it ran just fine.  However, when I went to test it on our GIS server, that's where the trouble began.  It seems to not be able to connect to the Oracle database via the script, as I presented with the 'Error:  000732: < dataset name > does not exist or is not supported' error when running any tool that requires a connection as an input (e.g MakeTableView, CopyRows, TableToGeodatabase, etc).  Definitely has me stumped because I am able to connect to the database manually via an OLE DB connection in both ArcCatalog and in ArcMap; however, when run in IDLE it fails.

At first I though it might be a 32-bit vs 64-bit issue.  The desktop machine uses the 32-bit flavor of python in IDLE.  Thought perhaps the server was forcing the script to run using the 64-bit, but after running this helpful little bit of code:

import sys
print sys.version

it appears as though the server is running 32-bit as well.  

As far as I know the Oracle database we are connecting to is 11g.  However, both the server and desktop machines are using the 12c Release 2 (12.2.0.1.0) 32-bit flavor of the Oracle client because the 11g client does not does support Windows 10.   Currently, my desktop machine is running 10.3.1 and the server machine is running 10.4.1, w/ python versions 2.7.8 and 2.7.10, respectively.

The only thing I haven't tested is installing the 64-bit version of the client software on the server side.  Even though IDLE tells me it's running on the 32-bit side of things, I have a suspicion that somehow the connection to the database needs a 64-bit component ...    

Tags (3)
0 Kudos
10 Replies
Brownschuh
Occasional Contributor II

After almost 3/4th's of a year, I finally got this figured out.  I actually had put this task on the back-burner, as I was able to run my script just fine on a local machine.  However, in an effort to get all of our automated tasks running in a server environment, I decided once again to explore the issue I was having.

Here's what I did:  made sure both the 32-bit and 64-bit Oracle clients were installed on the server.  I had both installed before under a generic account but I actually had to reinstall both because our organization switched some security policies.  Next (and I think this was the task that fixed the issue) I made sure that the 'Path' system variable under Environmental Variables was pointed to the following folders:

D:\app\client\<username>\product\12.2.0\client_2\bin

D:\app\client\<username>/product\12.2.0\client_1\bin

Obviously 2 folders for the 32 and 64-bit flavors of the client.  Now I am successfully able to open the OLE DB connection on the server in arcmap as well as the nightly python script.

0 Kudos