<?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 Re: That Cursor Thing 'cos I did a COMMIT - CX_SY_OPEN_SQL_DB in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/that-cursor-thing-cos-i-did-a-commit-cx-sy-open-sql-db/m-p/11904957#M1962659</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you both for your guidance here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the good old fashioned COMMIT WORK AND WAIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suspect I should instead be using the FM DB_COMMIT or alternatively coding that into my program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll give it a try in the morning&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arden&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Sep 2016 11:18:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2016-09-29T11:18:09Z</dc:date>
    <item>
      <title>That Cursor Thing 'cos I did a COMMIT - CX_SY_OPEN_SQL_DB</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/that-cursor-thing-cos-i-did-a-commit-cx-sy-open-sql-db/m-p/11904954#M1962656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ABAPers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a massive amount of data to churn through as part of a migration over a number of tables,so naturally to minimize the risk of a program crash due to memory I want to commit my inserts in nice sized chunks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot risk having over a million records or more tied up in memory before the program performs it standard commit on exit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Typically I do my reads in Package Size chunks and that works great for performance, but as I also need to commit the cleansed data within that Package read...which naturally on the next package read, results in my friend the CX_SY_OPEN_SQL_DB Error...because the "Cursor already closed or not open yet'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I've read a stack of threads on using the OPEN CURSOR with HOLD and all of that jazz...we'll that's not working either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a real last resort I could multi-thread the Insert into standalone call Asynchronous set of processes but I'd rather not give away that much control as this data must be 100% accounted for once the processing is complete. To code all of that in would be a last resort. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Surely this should be possible within the same process and I'm just missing something obvious.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As always, just like every other thread on SCN this is so totally urgent...&lt;SPAN __jive_emoticon_name="wink" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_emote jive_macro" src="https://community.sap.com/108/images/emoticons/wink.gif"&gt;&lt;/SPAN&gt;&lt;SPAN __jive_emoticon_name="laugh" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_emote jive_macro" src="https://community.sap.com/108/images/emoticons/laugh.gif"&gt;&lt;/SPAN&gt;&lt;SPAN __jive_emoticon_name="mischief" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_emote jive_macro" src="https://community.sap.com/108/images/emoticons/mischief.gif"&gt;&lt;/SPAN&gt;&lt;SPAN __jive_emoticon_name="silly" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_emote jive_macro" src="https://community.sap.com/108/images/emoticons/silly.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking forward to your responses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arden&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2016 07:55:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/that-cursor-thing-cos-i-did-a-commit-cx-sy-open-sql-db/m-p/11904954#M1962656</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-09-29T07:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: That Cursor Thing 'cos I did a COMMIT - CX_SY_OPEN_SQL_DB</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/that-cursor-thing-cos-i-did-a-commit-cx-sy-open-sql-db/m-p/11904955#M1962657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The ABAP documentation says:&lt;/P&gt;&lt;P&gt;If the addition WITH HOLD is specified, the database cursor is not closed by a database commit executed using Native SQL. The addition has no influence, however, on implicit database commits or on any rollbacks which always close the database cursor.&lt;/P&gt;&lt;P&gt;Note : A Native SQL database commit can be executed with the DB_COMMIT function module, for example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if it doesn't work, you should contact the SAP support.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2016 09:14:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/that-cursor-thing-cos-i-did-a-commit-cx-sy-open-sql-db/m-p/11904955#M1962657</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2016-09-29T09:14:00Z</dc:date>
    </item>
    <item>
      <title>Re: That Cursor Thing 'cos I did a COMMIT - CX_SY_OPEN_SQL_DB</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/that-cursor-thing-cos-i-did-a-commit-cx-sy-open-sql-db/m-p/11904956#M1962658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;but as I also need to commit the cleansed data within that Package read...which naturally on the next package read, results in my friend the CX_SY_OPEN_SQL_DB Error...&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;For the sake of clarity, h&lt;SPAN style="font-size: 10pt;"&gt;ow are you "committing" the data? As Sandra has already pointed out, WITH HOLD prevents the SQL cursor from being closed by "explicit" DB-commits.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;As a real last resort I could multi-thread the Insert into standalone call Asynchronous set of processes but I'd rather not give away that much control as this data must be 100% accounted for once the processing is complete. To code all of that in would be a last resort.&lt;/SPAN&gt;&lt;/P&gt;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Of late i have been using parallel processing capabilities of ABAP and from my experience i can say that it's not that complex to code &lt;SPAN __jive_emoticon_name="wink" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/108/images/emoticons/wink.gif"&gt;&lt;/SPAN&gt; Of course because since the data integrity is of utmost importance in your program, strong fallback mechanisms have to coded as well &lt;SPAN __jive_emoticon_name="grin" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/108/images/emoticons/grin.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2016 10:08:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/that-cursor-thing-cos-i-did-a-commit-cx-sy-open-sql-db/m-p/11904956#M1962658</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2016-09-29T10:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: That Cursor Thing 'cos I did a COMMIT - CX_SY_OPEN_SQL_DB</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/that-cursor-thing-cos-i-did-a-commit-cx-sy-open-sql-db/m-p/11904957#M1962659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you both for your guidance here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the good old fashioned COMMIT WORK AND WAIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suspect I should instead be using the FM DB_COMMIT or alternatively coding that into my program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll give it a try in the morning&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arden&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2016 11:18:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/that-cursor-thing-cos-i-did-a-commit-cx-sy-open-sql-db/m-p/11904957#M1962659</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-09-29T11:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: That Cursor Thing 'cos I did a COMMIT - CX_SY_OPEN_SQL_DB</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/that-cursor-thing-cos-i-did-a-commit-cx-sy-open-sql-db/m-p/11904958#M1962660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So it was the DB_COMMIT that I should have been using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another day another lesson learned &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/108/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 04:13:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/that-cursor-thing-cos-i-did-a-commit-cx-sy-open-sql-db/m-p/11904958#M1962660</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-09-30T04:13:02Z</dc:date>
    </item>
  </channel>
</rss>

