<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic calling Oracle stored procedure using ArcSDESQLExecute with input and output parameters in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/calling-oracle-stored-procedure-using/m-p/1010556#M59311</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to call&amp;nbsp;Oracle stored procedure which has input and output parameters using ArcSDESQLExecute.&lt;/P&gt;&lt;P&gt;CALL package.procedurename(outParams, inParams)&lt;/P&gt;&lt;P&gt;But it is throwing an error as below -&lt;/P&gt;&lt;P&gt;AttributeError: ArcSDESQLExecute: StreamExecute ArcSDE Extended error 6576 ORA-06576: not a valid function or procedure name&lt;/P&gt;&lt;P&gt;But when we execute the Stored procedure with same parameters in Toad, there is no issue seen.&lt;/P&gt;&lt;P&gt;Could you please let know what could be the issue here?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vibha&lt;/P&gt;</description>
    <pubDate>Thu, 17 Dec 2020 13:13:56 GMT</pubDate>
    <dc:creator>VibhavathiAralaguppi</dc:creator>
    <dc:date>2020-12-17T13:13:56Z</dc:date>
    <item>
      <title>calling Oracle stored procedure using ArcSDESQLExecute with input and output parameters</title>
      <link>https://community.esri.com/t5/python-questions/calling-oracle-stored-procedure-using/m-p/1010556#M59311</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to call&amp;nbsp;Oracle stored procedure which has input and output parameters using ArcSDESQLExecute.&lt;/P&gt;&lt;P&gt;CALL package.procedurename(outParams, inParams)&lt;/P&gt;&lt;P&gt;But it is throwing an error as below -&lt;/P&gt;&lt;P&gt;AttributeError: ArcSDESQLExecute: StreamExecute ArcSDE Extended error 6576 ORA-06576: not a valid function or procedure name&lt;/P&gt;&lt;P&gt;But when we execute the Stored procedure with same parameters in Toad, there is no issue seen.&lt;/P&gt;&lt;P&gt;Could you please let know what could be the issue here?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vibha&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2020 13:13:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calling-oracle-stored-procedure-using/m-p/1010556#M59311</guid>
      <dc:creator>VibhavathiAralaguppi</dc:creator>
      <dc:date>2020-12-17T13:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: calling Oracle stored procedure using ArcSDESQLExecute with input and output parameters</title>
      <link>https://community.esri.com/t5/python-questions/calling-oracle-stored-procedure-using/m-p/1010920#M59320</link>
      <description>&lt;P&gt;None of my examples using CALL with&amp;nbsp;ArcSDESQLExecute have parameters. The one place I do have parameters, I used &lt;A href="https://cx-oracle.readthedocs.io/en/latest/user_guide/installation.html#overview" target="_self"&gt;cx_Oracle&lt;/A&gt;. In my case, the procedure returned a REF CURSOR so I write that data to a CSV file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Create connection
conn_str = u"{}/{}@{}".format(dbUser, dbPass, dbOracleInstance)
oracle_dbconn = cx_Oracle.connect(conn_str)

# Execute package procedure
cursor = oracle_dbconn.cursor()
ref_cursor = oracle_dbconn.cursor()
procedure = "schema.package.procedurename"
cursor.callproc(procedure, [ref_cursor, input_param])

# Process resulting ref_cursor
if not csv_fields_out:
    # Write field name header line
    csv_fields_out = [result_column[0] for result_column in ref_cursor.description]
    csv_writer.writerow(csv_fields_out)

for data_row in ref_cursor:
    # Write data lines
    csv_writer.writerow(data_row)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2020 15:01:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calling-oracle-stored-procedure-using/m-p/1010920#M59320</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2020-12-18T15:01:57Z</dc:date>
    </item>
  </channel>
</rss>

