<?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: Max_temp_space still problematic. Database Asserts in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/max-temp-space-still-problematic-database-asserts/qaa-p/13835171#M4866014</link>
    <description>&lt;P&gt;That's good info to have.  Thank you Volker!&lt;/P&gt;</description>
    <pubDate>Thu, 15 Jun 2023 14:50:34 GMT</pubDate>
    <dc:creator>former_SQLA_member1694871</dc:creator>
    <dc:date>2023-06-15T14:50:34Z</dc:date>
    <item>
      <title>Max_temp_space still problematic. Database Asserts</title>
      <link>https://community.sap.com/t5/technology-q-a/max-temp-space-still-problematic-database-asserts/qaq-p/13835167</link>
      <description>&lt;P&gt;Environment - 17.0.11.7058 running on Windows Server
Page Size - 8k (8192)&lt;/P&gt;
&lt;P&gt;I'm working with a team that has a fairly extensive SQL Anywhere implementation that they are using in conjunction with Mobilink. &lt;/P&gt;
&lt;P&gt;I started looking into this issue, but it looked like the version my group is running &lt;/P&gt;
&lt;P&gt;link &lt;A href="https://sqlanywhere-forum.sap.com/questions/30153/max_temp_space-option-doesnt-seem-to-work" target="_blank"&gt;max temp space issues&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Their database is running along around the 76GB in size range. Multiple stores have smaller SQL Anywhere installations and are sending Mobilink messages to the master database on the hour.&lt;/P&gt;
&lt;P&gt;Sometime back they started running into an issue with their temp file growing to the point where the hard disk would run out of hard disk space and the database would assert.  They found that they have needed to shut the database down every 3 to 4 days to allow the temp file to reset so the database doesn't cause the machine to go down.&lt;/P&gt;
&lt;P&gt;image &lt;A title="TempFile" target="_blank"&gt;large temp file&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If the image does not link correctly, the size of the temp file "sqla0000.tmp" is 136GB in this picture.&lt;/P&gt;
&lt;P&gt;The problem we have is the max_temp_space option is set to 100g&lt;/P&gt;
&lt;P&gt;Some additional parameters that might help...
max_temp_space  100g&lt;/P&gt;
&lt;P&gt;temp_space_limit_check - On&lt;/P&gt;
&lt;P&gt;ExtendedTempWrite - 22954912&lt;/P&gt;
&lt;P&gt;FreePages - 1707&lt;/P&gt;
&lt;P&gt;tempFileName - T:\\SQLANY\\sqla0000.tmp&lt;/P&gt;
&lt;P&gt;TempTablePages  11284787&lt;/P&gt;
&lt;P&gt;I had read in the link provided that the individual that ran into this issue back in 2017 had found out they could use the -ca switch to complement the temp file size issue that they were running into.&lt;/P&gt;
&lt;P&gt;Is there a possibility that the -ca switch needs to be used with it? &lt;/P&gt;
&lt;P&gt;Is there a possibility they might be running into a bug that has crept up again within SQL Anywhere itself?&lt;/P&gt;
&lt;P&gt;Any suggestions on what might be needed would be greatly appreciated. Please advise if there is additional information I can send that might be able to help out with this issue.&lt;/P&gt;
&lt;P&gt;Jeff Gibson&lt;/P&gt;
&lt;P&gt;Exonero Solutions&lt;/P&gt;
&lt;P&gt;Nashville, TN&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 17:06:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/max-temp-space-still-problematic-database-asserts/qaq-p/13835167</guid>
      <dc:creator>former_SQLA_member1694871</dc:creator>
      <dc:date>2023-06-14T17:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Max_temp_space still problematic. Database Asserts</title>
      <link>https://community.sap.com/t5/technology-q-a/max-temp-space-still-problematic-database-asserts/qaa-p/13835168#M4866011</link>
      <description>&lt;P&gt;max_temp_space enforces a limit per connection. 2 connections with a 100GB limit could easily, in aggregate, use 136 GB of temp space.&lt;/P&gt;
&lt;P&gt;When you report the TempTablePages value above, was that at the database level or the connection level? ie, are you using db_property('tempfilepages') or connection_property('tempfilepages')?&lt;/P&gt;
&lt;P&gt;-ca 0 probably didn't have much to do with the old case that you referenced. The old case was more about certain code paths that didn't check the limit.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 21:46:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/max-temp-space-still-problematic-database-asserts/qaa-p/13835168#M4866011</guid>
      <dc:creator>johnsmirnios</dc:creator>
      <dc:date>2023-06-14T21:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: Max_temp_space still problematic. Database Asserts</title>
      <link>https://community.sap.com/t5/technology-q-a/max-temp-space-still-problematic-database-asserts/qaa-p/13835169#M4866012</link>
      <description>&lt;P&gt;The &lt;CODE&gt;max_temp_space&lt;/CODE&gt; option defines per connection the limit on temporary usage. Your current setting indicates that a connection can use up to 100G before the error &lt;CODE&gt;SQLSTATE_TEMP_SPACE_LIMIT&lt;/CODE&gt; is triggered.  The TempTablePages value indicates there is a 86 &lt;STRONG&gt;TB&lt;/STRONG&gt; temporary file ( TempTablePages * PageSize ). I prefer to query TempTablePages as the file size may not be correctly reported while the engine is running. &lt;/P&gt;
&lt;P&gt;Is it possible that there is a very large Snapshot isolation query? The version_entries reported in &lt;CODE&gt;sa_transactions()&lt;/CODE&gt; is a useful datapoint to determine the impact of queries using Snapshot isolation. MobiLink uses snapshots for downloads - if the download is large, the temp file is likely to grow to back the row versions on a busy server.&lt;/P&gt;
&lt;P&gt;I would either manually query &lt;CODE&gt;sa_performance_statistics()&lt;/CODE&gt; and &lt;CODE&gt;sa_transactions()&lt;/CODE&gt; or create an event that periodically collects the results and stores in a table or file. &lt;/P&gt;
&lt;P&gt;It would be also useful to enable RememberLastStatement so that you can query the what statement was being run by the connection that is consuming the temp space. To view the last statement,  query CONNECTION_PROPERTY( 'LastStatement', &amp;lt;connnumber&amp;gt; ) or &lt;CODE&gt;sa_conn_properties()&lt;/CODE&gt; to see all connections.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 22:32:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/max-temp-space-still-problematic-database-asserts/qaa-p/13835169#M4866012</guid>
      <dc:creator>chris_keating</dc:creator>
      <dc:date>2023-06-14T22:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Max_temp_space still problematic. Database Asserts</title>
      <link>https://community.sap.com/t5/technology-q-a/max-temp-space-still-problematic-database-asserts/qaa-p/13835170#M4866013</link>
      <description>&lt;P&gt;Just to add:&lt;/P&gt;
&lt;P&gt;The &lt;A href="https://dcx.sap.com/index.html#sqla170/en/html/3bcac0a86c5f10148e469547933d58ff.html"&gt;system events&lt;/A&gt; GrowTemp and/or TempDiskSpace might be used here to get notified and possibly take action when the temp file grows unexpectedly.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 03:59:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/max-temp-space-still-problematic-database-asserts/qaa-p/13835170#M4866013</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2023-06-15T03:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: Max_temp_space still problematic. Database Asserts</title>
      <link>https://community.sap.com/t5/technology-q-a/max-temp-space-still-problematic-database-asserts/qaa-p/13835171#M4866014</link>
      <description>&lt;P&gt;That's good info to have.  Thank you Volker!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 14:50:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/max-temp-space-still-problematic-database-asserts/qaa-p/13835171#M4866014</guid>
      <dc:creator>former_SQLA_member1694871</dc:creator>
      <dc:date>2023-06-15T14:50:34Z</dc:date>
    </item>
  </channel>
</rss>

