I'm attempting to execute an Oracle 12c stored procedure using ArcSDESQLExecute:
import arcpy
egdb_conn = arcpy.ArcSDESQLExecute(r"Database Connections\con1.sde")
sql = '''execute update_sle (2500000, 500000)'''
egdb_return = egdb_conn.execute(sql)
print "Complete."
However, I'm getting the following error:
Message File Name Line Position
Traceback
<module> <module1> 21
execute C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\arcobjects\arcobjects.py 27
AttributeError: ArcSDESQLExecute: StreamExecute ArcSDE Extended error 900 ORA-00900: invalid SQL statement
Question:
How can I execute an Oracle stored procedure by using ArcSDESQLExecute?
Notes:
- The python script executes successfully on
select
queries. Therefore, I know the script works. - I can execute the procedure from SQL Developer successfully. Therefore, I know the procedure works.
- I tried
SET FEEDBACK OFF
but got an error. More info here. - Related question/answer here, but I think it's for SQL Server.
call
instead ofexecute
? community.esri.com/thread/3887#comment-118410