<?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: How do I simulate assertions with SQL Anywhere 16? in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/how-do-i-simulate-assertions-with-sql-anywhere-16/qaa-p/13847470#M4878313</link>
    <description>&lt;P&gt;&lt;A href="https://sqlanywhere-forum.sap.com/users/26/volker-barth/"&gt;@Volker&lt;/A&gt;: What a great idea, someone should write that!&lt;/P&gt;</description>
    <pubDate>Thu, 14 Mar 2013 10:55:24 GMT</pubDate>
    <dc:creator>Breck_Carter</dc:creator>
    <dc:date>2013-03-14T10:55:24Z</dc:date>
    <item>
      <title>How do I simulate assertions with SQL Anywhere 16?</title>
      <link>https://community.sap.com/t5/technology-q-a/how-do-i-simulate-assertions-with-sql-anywhere-16/qaq-p/13847462</link>
      <description>&lt;P&gt;I want test the behavior of various dbsrv16 -ufd option settings when server-level and database-level assertions occur.&lt;/P&gt;
&lt;P&gt;I don't care &lt;EM&gt;what&lt;/EM&gt; the assertion codes are, so fakes are OK.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2013 09:29:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-do-i-simulate-assertions-with-sql-anywhere-16/qaq-p/13847462</guid>
      <dc:creator>Breck_Carter</dc:creator>
      <dc:date>2013-03-14T09:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I simulate assertions with SQL Anywhere 16?</title>
      <link>https://community.sap.com/t5/technology-q-a/how-do-i-simulate-assertions-with-sql-anywhere-16/qaa-p/13847465#M4878308</link>
      <description>&lt;P&gt;Agreed, it would be handy if one could "fake an assertion" just as one might want to fake a "database validation error" when testing a backup/validation plan - IIRC, the latter has been asked in the past...&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2013 10:00:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-do-i-simulate-assertions-with-sql-anywhere-16/qaa-p/13847465#M4878308</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2013-03-14T10:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I simulate assertions with SQL Anywhere 16?</title>
      <link>https://community.sap.com/t5/technology-q-a/how-do-i-simulate-assertions-with-sql-anywhere-16/qaa-p/13847463#M4878306</link>
      <description>&lt;P&gt;One way to generate assertions would be to create a database and then corrupt it by changing the checksum on one of the database pages.&lt;/P&gt;
&lt;P&gt;WARNING: DO NOT DO THIS ON ANY DATABASE WITH REAL DATA !!&lt;/P&gt;
&lt;DIV class="codehilite"&gt;&lt;PRE&gt;&lt;SPAN class="n"&gt;dbinit&lt;/SPAN&gt; &lt;SPAN class="n"&gt;bad&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;db&lt;/SPAN&gt;
&lt;SPAN class="n"&gt;perl&lt;/SPAN&gt; &lt;SPAN class="n"&gt;corrupt_the_database&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;pl&lt;/SPAN&gt; &lt;SPAN class="n"&gt;bad&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;db&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;where corrupt_the_database.pl is the perl script containing:&lt;/P&gt;
&lt;TABLE class="codehilitetable"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="linenos"&gt;&lt;DIV class="linenodiv"&gt;&lt;PRE&gt; 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11&lt;/PRE&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;TD class="code"&gt;&lt;DIV class="codehilite"&gt;&lt;PRE&gt;&lt;SPAN class="c1"&gt;#&lt;/SPAN&gt;
&lt;SPAN class="c1"&gt;# Corrupt the checksum on page 3 of a SQL Anywhere database&lt;/SPAN&gt;
&lt;SPAN class="c1"&gt;# !! USE WITH EXTREME CARE !!&lt;/SPAN&gt;
&lt;SPAN class="c1"&gt;#&lt;/SPAN&gt;
&lt;SPAN class="nb"&gt;chmod&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt; &lt;SPAN class="mo"&gt;0777&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="nv"&gt;$ARGV&lt;/SPAN&gt;&lt;SPAN class="p"&gt;[&lt;/SPAN&gt;&lt;SPAN class="mi"&gt;0&lt;/SPAN&gt;&lt;SPAN class="p"&gt;]&lt;/SPAN&gt; &lt;SPAN class="p"&gt;);&lt;/SPAN&gt;
&lt;SPAN class="nb"&gt;open&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt; &lt;SPAN class="n"&gt;FOO&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="s"&gt;"+&amp;lt;$ARGV[0]"&lt;/SPAN&gt; &lt;SPAN class="p"&gt;)&lt;/SPAN&gt; &lt;SPAN class="o"&gt;||&lt;/SPAN&gt; &lt;SPAN class="nb"&gt;die&lt;/SPAN&gt; &lt;SPAN class="vg"&gt;$?&lt;/SPAN&gt;&lt;SPAN class="p"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="nb"&gt;binmode&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt; &lt;SPAN class="n"&gt;FOO&lt;/SPAN&gt; &lt;SPAN class="p"&gt;);&lt;/SPAN&gt;
&lt;SPAN class="nb"&gt;seek&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt; &lt;SPAN class="n"&gt;FOO&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="mi"&gt;3&lt;/SPAN&gt;&lt;SPAN class="o"&gt;*&lt;/SPAN&gt;&lt;SPAN class="mi"&gt;4096&lt;/SPAN&gt;&lt;SPAN class="o"&gt;-&lt;/SPAN&gt;&lt;SPAN class="mi"&gt;4&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="mi"&gt;0&lt;/SPAN&gt; &lt;SPAN class="p"&gt;)&lt;/SPAN&gt; &lt;SPAN class="o"&gt;||&lt;/SPAN&gt; &lt;SPAN class="nb"&gt;die&lt;/SPAN&gt; &lt;SPAN class="vg"&gt;$?&lt;/SPAN&gt;&lt;SPAN class="p"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="k"&gt;print&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt; &lt;SPAN class="n"&gt;FOO&lt;/SPAN&gt; &lt;SPAN class="s"&gt;'\\0\\0\\0\\0'&lt;/SPAN&gt; &lt;SPAN class="p"&gt;)&lt;/SPAN&gt; &lt;SPAN class="o"&gt;||&lt;/SPAN&gt; &lt;SPAN class="nb"&gt;die&lt;/SPAN&gt; &lt;SPAN class="vg"&gt;$?&lt;/SPAN&gt;&lt;SPAN class="p"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="nb"&gt;seek&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt; &lt;SPAN class="n"&gt;FOO&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="mi"&gt;0&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="mi"&gt;2&lt;/SPAN&gt; &lt;SPAN class="p"&gt;);&lt;/SPAN&gt;
&lt;SPAN class="nb"&gt;close&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt; &lt;SPAN class="n"&gt;FOO&lt;/SPAN&gt; &lt;SPAN class="p"&gt;);&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;

&lt;P&gt;When you start the database on bad.db (e.g. "dbeng16 bad.db") the server will generate a "Checksum failure" assertion.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2013 10:01:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-do-i-simulate-assertions-with-sql-anywhere-16/qaa-p/13847463#M4878306</guid>
      <dc:creator>MarkCulp</dc:creator>
      <dc:date>2013-03-14T10:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I simulate assertions with SQL Anywhere 16?</title>
      <link>https://community.sap.com/t5/technology-q-a/how-do-i-simulate-assertions-with-sql-anywhere-16/qaa-p/13847466#M4878309</link>
      <description>&lt;P&gt;Presumably, that is a permanent error condition. Is there any way to cause a transient assertion, one that would allow dbsrv16 -ufd restart to successfully restart the database?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2013 10:09:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-do-i-simulate-assertions-with-sql-anywhere-16/qaa-p/13847466#M4878309</guid>
      <dc:creator>Breck_Carter</dc:creator>
      <dc:date>2013-03-14T10:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do I simulate assertions with SQL Anywhere 16?</title>
      <link>https://community.sap.com/t5/technology-q-a/how-do-i-simulate-assertions-with-sql-anywhere-16/qaa-p/13847467#M4878310</link>
      <description>&lt;P&gt;Yes, the corrupted checksum failure would be a permanent condition and therefore the restart attempt would fail.&lt;/P&gt;
&lt;P&gt;I do not know of any publicly available way of causing a temporary assertion.&lt;/P&gt;
&lt;P&gt;Perhaps one way would be to create a user table, put some data in it, add an index, shutdown the database, and then corrupt the index using a method similar to the above process.  Starting the database on such a table would succeed but accessing the table &lt;EM&gt;may&lt;/EM&gt; cause an assertion if the corruption was "just right". Again this type of corruption would be permanent but the restart of the database would succeed.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2013 10:30:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-do-i-simulate-assertions-with-sql-anywhere-16/qaa-p/13847467#M4878310</guid>
      <dc:creator>MarkCulp</dc:creator>
      <dc:date>2013-03-14T10:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do I simulate assertions with SQL Anywhere 16?</title>
      <link>https://community.sap.com/t5/technology-q-a/how-do-i-simulate-assertions-with-sql-anywhere-16/qaa-p/13847464#M4878307</link>
      <description>&lt;P&gt;Well, the typical EBF readme does contain several bug fixes for (temporary) assertions - some of them are declared with "under very rare circumstances" and the like, others sound reproducable.&lt;/P&gt;
&lt;P&gt;Is that a starting point?&lt;/P&gt;
&lt;P&gt;Yes, I know, v16 is brandnew, so there are no EBFs and readmes available yet...&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2013 10:47:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-do-i-simulate-assertions-with-sql-anywhere-16/qaa-p/13847464#M4878307</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2013-03-14T10:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do I simulate assertions with SQL Anywhere 16?</title>
      <link>https://community.sap.com/t5/technology-q-a/how-do-i-simulate-assertions-with-sql-anywhere-16/qaa-p/13847468#M4878311</link>
      <description>&lt;P&gt;&lt;A href="https://sqlanywhere-forum.sap.com/users/2/breck-carter/"&gt;@Breck&lt;/A&gt;: Are you working on "The top 10 cool features of SQL Anywhere 16"? (In case that allows for a publicly available answer:))&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2013 10:48:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-do-i-simulate-assertions-with-sql-anywhere-16/qaa-p/13847468#M4878311</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2013-03-14T10:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do I simulate assertions with SQL Anywhere 16?</title>
      <link>https://community.sap.com/t5/technology-q-a/how-do-i-simulate-assertions-with-sql-anywhere-16/qaa-p/13847469#M4878312</link>
      <description>&lt;P&gt;Soooo... a valuable new feature exists with no way to prove it... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2013 10:54:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-do-i-simulate-assertions-with-sql-anywhere-16/qaa-p/13847469#M4878312</guid>
      <dc:creator>Breck_Carter</dc:creator>
      <dc:date>2013-03-14T10:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: How do I simulate assertions with SQL Anywhere 16?</title>
      <link>https://community.sap.com/t5/technology-q-a/how-do-i-simulate-assertions-with-sql-anywhere-16/qaa-p/13847470#M4878313</link>
      <description>&lt;P&gt;&lt;A href="https://sqlanywhere-forum.sap.com/users/26/volker-barth/"&gt;@Volker&lt;/A&gt;: What a great idea, someone should write that!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2013 10:55:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-do-i-simulate-assertions-with-sql-anywhere-16/qaa-p/13847470#M4878313</guid>
      <dc:creator>Breck_Carter</dc:creator>
      <dc:date>2013-03-14T10:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I simulate assertions with SQL Anywhere 16?</title>
      <link>https://community.sap.com/t5/technology-q-a/how-do-i-simulate-assertions-with-sql-anywhere-16/qaa-p/13847471#M4878314</link>
      <description>&lt;P&gt;Well, we've proved it in house... but I'm working on a method for you to prove it to yourself... give me a few more &lt;DEL&gt;minutes&lt;/DEL&gt; days.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2013 11:19:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-do-i-simulate-assertions-with-sql-anywhere-16/qaa-p/13847471#M4878314</guid>
      <dc:creator>MarkCulp</dc:creator>
      <dc:date>2013-03-14T11:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do I simulate assertions with SQL Anywhere 16?</title>
      <link>https://community.sap.com/t5/technology-q-a/how-do-i-simulate-assertions-with-sql-anywhere-16/qaa-p/13847472#M4878315</link>
      <description>&lt;P&gt;Take all the time you need, take weeks!&lt;/P&gt;
&lt;P&gt; &lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Re How do I simulate assertions with SQL Anywhere 16"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/189782iB959907ABAC052D3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Re How do I simulate assertions with SQL Anywhere 16" alt="Re How do I simulate assertions with SQL Anywhere 16" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2013 18:02:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-do-i-simulate-assertions-with-sql-anywhere-16/qaa-p/13847472#M4878315</guid>
      <dc:creator>Breck_Carter</dc:creator>
      <dc:date>2013-03-14T18:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: How do I simulate assertions with SQL Anywhere 16?</title>
      <link>https://community.sap.com/t5/technology-q-a/how-do-i-simulate-assertions-with-sql-anywhere-16/qaa-p/13847473#M4878316</link>
      <description>&lt;P&gt;Well, someone seems to have just done that:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://scn.sap.com/docs/DOC-40056"&gt;Top 10 Cool New Features in SAP Sybase SQL Anywhere 16&lt;/A&gt;...&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;Isn't that a smart "nearly-invisible announcement":)&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2013 05:52:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-do-i-simulate-assertions-with-sql-anywhere-16/qaa-p/13847473#M4878316</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2013-04-08T05:52:40Z</dc:date>
    </item>
  </channel>
</rss>

