Skip to main content
deleted 18 characters in body
Source Link
User1974
  • 1.3k
  • 16
  • 64

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_service_level_evt_tblupdate_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:

  1. The python script executes successfully on select queries. Therefore, I know the script works.
  2. I can execute the procedure from SQL Developer successfully. Therefore, I know the procedure works.
  3. I tried SET FEEDBACK OFF but got an error. More info here.
  4. Related question/answer here, but I think it's for SQL Server.

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_service_level_evt_tbl (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:

  1. The python script executes successfully on select queries. Therefore, I know the script works.
  2. I can execute the procedure from SQL Developer successfully. Therefore, I know the procedure works.
  3. I tried SET FEEDBACK OFF but got an error. More info here.
  4. Related question/answer here, but I think it's for SQL Server.

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:

  1. The python script executes successfully on select queries. Therefore, I know the script works.
  2. I can execute the procedure from SQL Developer successfully. Therefore, I know the procedure works.
  3. I tried SET FEEDBACK OFF but got an error. More info here.
  4. Related question/answer here, but I think it's for SQL Server.
deleted 118 characters in body
Source Link
User1974
  • 1.3k
  • 16
  • 64

I'm attempting to execute an Oracle 12c stored procedure using ArcSDESQLExecute:

import arcpy

import arcpy

# Use a connection file to create the connection
egdb = r"Database Connections\Connection to xyz owner.sde"
egdb_conn = arcpy.ArcSDESQLExecute(egdbr"Database Connections\con1.sde")

sql = '''execute update_sleupdate_service_level_evt_tbl (2500000, 500000)'''
 
egdb_return = egdb_conn.execute(sql)
for i in egdb_return:
    print('{}: {}'"Complete.format(*i))"

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:

  1. The python script executes successfully on select queries. Therefore, I know the script works.
  2. I can execute the procedure from SQL Developer successfully. Therefore, I know the procedure works.
  3. I tried SET FEEDBACK OFF but got an error. More info here.
  4. Related question/answer here, but I think it's for SQL Server.

I'm attempting to execute an Oracle 12c stored procedure using ArcSDESQLExecute:

import arcpy

# Use a connection file to create the connection
egdb = r"Database Connections\Connection to xyz owner.sde"
egdb_conn = arcpy.ArcSDESQLExecute(egdb)

sql = '''execute update_sle (2500000, 500000)'''
 
egdb_return = egdb_conn.execute(sql)
for i in egdb_return:
    print('{}: {}'.format(*i))

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:

  1. The python script executes successfully on select queries. Therefore, I know the script works.
  2. I can execute the procedure from SQL Developer successfully. Therefore, I know the procedure works.
  3. I tried SET FEEDBACK OFF but got an error. More info here.
  4. Related question/answer here, but I think it's for SQL Server.

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_service_level_evt_tbl (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:

  1. The python script executes successfully on select queries. Therefore, I know the script works.
  2. I can execute the procedure from SQL Developer successfully. Therefore, I know the procedure works.
  3. I tried SET FEEDBACK OFF but got an error. More info here.
  4. Related question/answer here, but I think it's for SQL Server.
added 3 characters in body; edited tags; added 1 character in body; added 4 characters in body
Source Link
User1974
  • 1.3k
  • 16
  • 64

I'm attempting to execute an Oracle 12c stored procedure using ArcSDESQLExecute:

import arcpy

# Use a connection file to create the connection
egdb = r"Database Connections\Connection to xyz owner.sde"
egdb_conn = arcpy.ArcSDESQLExecute(egdb)

sql = '''execute update_sle (2500000, 500000)'''

egdb_return = egdb_conn.execute(sql)
for i in egdb_return:
    print('{}: {}'.format(*i))

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:Notes:

  1. The python script executes successfully on select queries. Therefore, I know the script works.
  2. I can execute the procedure from SQL Developer successfully. Therefore, I know the procedure works.
  3. I tried SET FEEDBACK OFF but got an error. More info here.
  4. Related question/answer here, but I think it's for SQL Server.

I'm attempting to execute an Oracle stored procedure using ArcSDESQLExecute:

import arcpy

# Use a connection file to create the connection
egdb = r"Database Connections\Connection to xyz owner.sde"
egdb_conn = arcpy.ArcSDESQLExecute(egdb)

sql = '''execute update_sle (2500000, 500000)'''

egdb_return = egdb_conn.execute(sql)
for i in egdb_return:
    print('{}: {}'.format(*i))

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:

  1. The python script executes successfully on select queries. Therefore, I know the script works.
  2. I can execute the procedure from SQL Developer successfully. Therefore, I know the procedure works.
  3. I tried SET FEEDBACK OFF but got an error. More info here.
  4. Related question/answer here, but I think it's for SQL Server.

I'm attempting to execute an Oracle 12c stored procedure using ArcSDESQLExecute:

import arcpy

# Use a connection file to create the connection
egdb = r"Database Connections\Connection to xyz owner.sde"
egdb_conn = arcpy.ArcSDESQLExecute(egdb)

sql = '''execute update_sle (2500000, 500000)'''

egdb_return = egdb_conn.execute(sql)
for i in egdb_return:
    print('{}: {}'.format(*i))

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:

  1. The python script executes successfully on select queries. Therefore, I know the script works.
  2. I can execute the procedure from SQL Developer successfully. Therefore, I know the procedure works.
  3. I tried SET FEEDBACK OFF but got an error. More info here.
  4. Related question/answer here, but I think it's for SQL Server.
Source Link
User1974
  • 1.3k
  • 16
  • 64
Loading