<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: How to improve performance of MSSql system database with jTDS driver (many temporary files)</title><link>https://answers.axonivy.com/questions/2007/how-to-improve-performance-of-mssql-system-database-with-jtds-driver-many-temporary-files</link><description>&lt;p&gt;If I use an Microsoft SQL Server as System Database and access it with the jTDS driver. Then I have many temporary files (jdtsXYZ.tmp) stored with clob and blob data in the temp folder. How can I avoid that they are created? Because it is obvious that the performance of storing such files is not as good as if the data is only held in memory.&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/2007/how-to-improve-performance-of-mssql-system-database-with-jtds-driver-many-temporary-files" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 07 Sep 2016 09:29:56 -0400</lastBuildDate><item><title>Answer by Christian Strebel</title><link>https://answers.axonivy.com/questions/2007/how-to-improve-performance-of-mssql-system-database-with-jtds-driver-many-temporary-files/2008</link><description>&lt;p&gt;You can configure the limit if a big clob or blob data is stored in a temporary file with the additional connection property &lt;em&gt;lobBuffer&lt;/em&gt; which is set to "32768" (32kb) by default. Means by default every clob or blob data which is bigger than 32kb is stored as an temorary file. Our recommendation is to increase &lt;em&gt;lobBuffer&lt;/em&gt; to 524288 (512kb) or even more, but not too big if you have not enough memory. Fore a good value which suits your needs you can look at the file size of the jdtsXYZ.tmp files already created.&lt;/p&gt;
&lt;p&gt;For other performance improvements you could also increase the follwoing properties:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;bufferMaxMemory&lt;/em&gt; default value 1024 in kb (1mb): Controls the global buffer memory limit for all connections (in kilobytes).&lt;/li&gt;
&lt;li&gt;&lt;em&gt;packetSize&lt;/em&gt; default 4096 or 512 in bytes: The network packet size (a multiple of 512).&lt;/li&gt;
&lt;li&gt;&lt;em&gt;bufferMinPackets&lt;/em&gt; default 8 packets (8 * packed size): Controls the minimum number of packets per statement to buffer to memory.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For more detailed description of the properties see &lt;a href="https://www.qint.de/joria/doc/jdbc/jtds.html"&gt;jTDS driver options&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Be careful to not increase this values too much, because you then need a lot of memory! Be aware that you have per default a maximum of 50 connections to the system database!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can configure this additional connection properties with the "Engine Configuration" tool:
&lt;img alt="Engine Configuration" src="http://answers.axonivy.com/upfiles/performance-additional-connection-properties_mssql-jTDS.png"&gt;
or directly in the serverconfig.xml:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;serverConfiguration&amp;gt;
    &amp;lt;systemDatabase&amp;gt;
        &amp;lt;driverName&amp;gt;net.sourceforge.jtds.jdbc.Driver&amp;lt;/driverName&amp;gt;
        &amp;lt;connectionUrl&amp;gt;jdbc:jtds:sqlserver://...&amp;lt;/connectionUrl&amp;gt;
        &amp;lt;username&amp;gt;...&amp;lt;/username&amp;gt;
        &amp;lt;password&amp;gt;...&amp;lt;/password&amp;gt;
        &amp;lt;property&amp;gt;
            &amp;lt;name&amp;gt;bufferMaxMemory&amp;lt;/name&amp;gt;
            &amp;lt;value&amp;gt;102400&amp;lt;/value&amp;gt;
        &amp;lt;/property&amp;gt;
        &amp;lt;property&amp;gt;
            &amp;lt;name&amp;gt;lobBuffer&amp;lt;/name&amp;gt;
            &amp;lt;value&amp;gt;524288&amp;lt;/value&amp;gt;
        &amp;lt;/property&amp;gt;
        &amp;lt;property&amp;gt;
            &amp;lt;name&amp;gt;packetSize&amp;lt;/name&amp;gt;
            &amp;lt;value&amp;gt;4096&amp;lt;/value&amp;gt;
        &amp;lt;/property&amp;gt;
        &amp;lt;property&amp;gt;
            &amp;lt;name&amp;gt;bufferMinPackets&amp;lt;/name&amp;gt;
            &amp;lt;value&amp;gt;32&amp;lt;/value&amp;gt;
        &amp;lt;/property&amp;gt;
    &amp;lt;/systemDatabase&amp;gt;
&amp;lt;/serverConfiguration&amp;gt;
&lt;/code&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Christian Strebel</dc:creator><pubDate>Wed, 07 Sep 2016 09:29:56 -0400</pubDate><guid>https://answers.axonivy.com/questions/2007/how-to-improve-performance-of-mssql-system-database-with-jtds-driver-many-temporary-files/2008</guid></item></channel></rss>