<?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>Question Re: Execute SqlAnywhere 11 Command without Rollback on Windows using the UTILITY_DB in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/execute-sqlanywhere-11-command-without-rollback-on-windows-using-the/qaa-p/13846400#M4877243</link>
    <description>&lt;P&gt;What exact problem are you facing - what's the link between START DATABASE and a rollback? Are you trying to start a database and that should not have an impact on the current transaction? (I don't know if it does, at least START DATABASE should not do an auto-commit.)&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;Just as a general hint: There are several ways to prevent an impact of operations on the current transaction, e.g.:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;put these operations within a &lt;A href="http://dcx.sybase.com/index.html#sa160/en/dbusage/trsave.html"&gt;savepoint&lt;/A&gt; than can be rollbacked without "disturbing" the surrounding transaction&lt;/LI&gt;
&lt;LI&gt;use an event to execute these operations and start that event from the current transaction: as events run on their own connection, they use a separate transaction by design&lt;/LI&gt;
&lt;LI&gt;put these operations within a separate transaction (though that necessarily means the current transaction must be committed beforehad unless you use a separate connection).&lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Wed, 05 Nov 2014 03:22:38 GMT</pubDate>
    <dc:creator>VolkerBarth</dc:creator>
    <dc:date>2014-11-05T03:22:38Z</dc:date>
    <item>
      <title>Execute SqlAnywhere 11 Command without Rollback on Windows using the UTILITY_DB</title>
      <link>https://community.sap.com/t5/technology-q-a/execute-sqlanywhere-11-command-without-rollback-on-windows-using-the/qaq-p/13846398</link>
      <description>&lt;P&gt;I use an application that connects to a SqlAnywhere 11 server/database by issuing the following command (taken from the ConsoleLogFile):&lt;/P&gt;
&lt;PRE class="codehilite"&gt;&lt;CODE&gt;&amp;lt;,3,EXEC_IMM,START DATABASE 'database-file.DBF' AS
"database-name" USING DISTINCT SQLSTATE
Starting database "database-name" (database-file.DBF) at Tue Nov 04 2014 09:42
Database recovery in progress
    Last checkpoint at Mon Sep 29 2014 13:05
    Checkpoint log...
    Transaction log: database-file.DBF.TLG...
Error: Cannot open transaction log file -- The system cannot find the file specified.
Recovery complete
E,3,-106,Cannot open transaction log file -- database-file.DBF.TLG
&amp;gt;.,3
&amp;lt;,3,DISCONNECT
Database "UTILITY_DB" (UTILITY_DB) stopped at Tue Nov 04 2014 09:42
&amp;gt;,3


&lt;P&gt;I'd like to emulate the way the application issues the &lt;CODE&gt;START DATABASE&lt;/CODE&gt; command but can't figure out how to execute with &lt;CODE&gt;EXEC_IMM&lt;/CODE&gt; (I'm assuming this is &lt;CODE&gt;EXECUTE IMMEDIATE&lt;/CODE&gt;?) when logged into the &lt;CODE&gt;UTILTIY_DB&lt;/CODE&gt; as &lt;CODE&gt;DBA&lt;/CODE&gt;; I can only seem to execute with &lt;CODE&gt;PREPARE&lt;/CODE&gt; (e.g., &lt;CODE&gt;&amp;lt;,3,EXEC_IMM,START DATABASE...&lt;/CODE&gt;). &lt;/P&gt;
&lt;P&gt;Most importantly I'd like to prevent a &lt;CODE&gt;ROLLBACK&lt;/CODE&gt; after the recovery. I tried starting the server and database with the &lt;CODE&gt;-f&lt;/CODE&gt; command, but it then complains about the database needing recovery.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;So, how do I execute &lt;EM&gt;unprepared&lt;/EM&gt; statements and/or prevent rollbacks on errors?&lt;/STRONG&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Nov 2014 16:36:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/execute-sqlanywhere-11-command-without-rollback-on-windows-using-the/qaq-p/13846398</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-11-04T16:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Execute SqlAnywhere 11 Command without Rollback on Windows using the UTILITY_DB</title>
      <link>https://community.sap.com/t5/technology-q-a/execute-sqlanywhere-11-command-without-rollback-on-windows-using-the/qaa-p/13846400#M4877243</link>
      <description>&lt;P&gt;What exact problem are you facing - what's the link between START DATABASE and a rollback? Are you trying to start a database and that should not have an impact on the current transaction? (I don't know if it does, at least START DATABASE should not do an auto-commit.)&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;Just as a general hint: There are several ways to prevent an impact of operations on the current transaction, e.g.:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;put these operations within a &lt;A href="http://dcx.sybase.com/index.html#sa160/en/dbusage/trsave.html"&gt;savepoint&lt;/A&gt; than can be rollbacked without "disturbing" the surrounding transaction&lt;/LI&gt;
&lt;LI&gt;use an event to execute these operations and start that event from the current transaction: as events run on their own connection, they use a separate transaction by design&lt;/LI&gt;
&lt;LI&gt;put these operations within a separate transaction (though that necessarily means the current transaction must be committed beforehad unless you use a separate connection).&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 05 Nov 2014 03:22:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/execute-sqlanywhere-11-command-without-rollback-on-windows-using-the/qaa-p/13846400#M4877243</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2014-11-05T03:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Execute SqlAnywhere 11 Command without Rollback on Windows using the UTILITY_DB</title>
      <link>https://community.sap.com/t5/technology-q-a/execute-sqlanywhere-11-command-without-rollback-on-windows-using-the/qaa-p/13846401#M4877244</link>
      <description>&lt;P&gt;I asked a similar question related to this issue on StackOverflow: &lt;A href="http://stackoverflow.com/questions/26742883/execute-sqlanywhere-11-command-without-rollback-on-windows-using-the-utility-db"&gt;http://stackoverflow.com/questions/26742883/execute-sqlanywhere-11-command-without-rollback-on-windows-using-the-utility-db&lt;/A&gt;. I'll update this question with more details in a moment&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2014 15:05:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/execute-sqlanywhere-11-command-without-rollback-on-windows-using-the/qaa-p/13846401#M4877244</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-11-05T15:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: Execute SqlAnywhere 11 Command without Rollback on Windows using the UTILITY_DB</title>
      <link>https://community.sap.com/t5/technology-q-a/execute-sqlanywhere-11-command-without-rollback-on-windows-using-the/qaa-p/13846399#M4877242</link>
      <description>&lt;P&gt;If the goal is to prevent a ROLLBACK of uncommitted transactions at the last time the database went down, the short answer is that you can't.&lt;/P&gt;
&lt;P&gt;The long answer is that even if you could, you'd have to deal with potential database issues like check constraints and referential integrity (specifically if wait_for_commit is used). However, you may be able to regain some of this data by applying translated SQL for those uncommitted transactions against the database manually.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2014 16:05:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/execute-sqlanywhere-11-command-without-rollback-on-windows-using-the/qaa-p/13846399#M4877242</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-11-05T16:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: Execute SqlAnywhere 11 Command without Rollback on Windows using the UTILITY_DB</title>
      <link>https://community.sap.com/t5/technology-q-a/execute-sqlanywhere-11-command-without-rollback-on-windows-using-the/qaa-p/13846402#M4877245</link>
      <description>&lt;P&gt;If you believe you have a big transaction that didn't complete you could always pull out the details from the transaction log using the dbtran utility. See dbtran -s -a to get at the SQL (and then change the rollback to be a commit and resubmit after the database recovers.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2014 17:58:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/execute-sqlanywhere-11-command-without-rollback-on-windows-using-the/qaa-p/13846402#M4877245</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-11-05T17:58:12Z</dc:date>
    </item>
  </channel>
</rss>

