Geoprocessing - Managing database connections

1399
1
12-13-2016 11:32 PM
Govindarajan
New Contributor II

Hello

I need expert guidance on effectively managing the connections to an Enterprise Geodatabase residing in Oracle database in 12C. However the lack of support for events - Initialise(), Startup(), Shutdown() - in geoprocessing makes the task of managing connections to geodatabase more difficult.

Description

I need to setup a Geoprocessing service (Standard scripting) in 10.4.1 ArcGIS Server that needs to connect to a Oracle 12c Ent Spatial database to query multiple featureclasses to generate an Excel report of the assets participating in a water utilities network trace. Every time a trace is executed it identifies close to 1000 features from just one single featureclass. The total number of assets getting selected varies from few hundreds to several thousands ( <30,000).

We have written queries that directly query the underlying spatial tables using SQLs that we trigger from Geoprocessing service . Everytime a geoprocessing service runs it is obtaining a fresh connection to the oracle geodatabase and executes the task. Ideally i like to make use of connection pooling and use the same. I like to know whether anyone had used cx_oracle package to enable connection pooling. Would appreciate any directives on how the connection pooling has been enabled .

I understand that ESRI has given a strong guidance for developers to adopt Python toolkit for geoprocessing.  Can the init() event in Python toolkit be used for initialising connections to database?

Any guidance would be appreciated.

Regards

Govindarajan

GIS Consultant

0 Kudos
1 Reply
Vara_PrasadM_S
Occasional Contributor II

Hi Govindarajan,

I have some similar problem. Could you please let me know how are you sending DB connection details as inputs to the GP Service?

Thanks in advance!

With Regards,

Vara Prasad.

0 Kudos