{"id":25714,"date":"2022-07-21T00:12:00","date_gmt":"2022-07-20T22:12:00","guid":{"rendered":"http:\/\/159.69.82.204\/win\/?p=25714"},"modified":"2022-07-20T23:18:07","modified_gmt":"2022-07-20T21:18:07","slug":"solution-for-access-performance-issues-with-an-access-database-using-an-odbc-driver","status":"publish","type":"post","link":"https:\/\/borncity.com\/win\/2022\/07\/21\/solution-for-access-performance-issues-with-an-access-database-using-an-odbc-driver\/","title":{"rendered":"Solution for access\/performance issues with an Access database using an ODBC driver"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px 10px 0px 0px\" src=\"https:\/\/www.borncity.com\/blog\/wp-content\/uploads\/2012\/07\/Office1.jpg\" width=\"55\" align=\"left\" height=\"60\">[<a href=\"https:\/\/www.borncity.com\/blog\/2022\/07\/20\/lsung-fr-zugriffs-performance-probleme-per-odbc-treiber-auf-access-datenbank\/\" target=\"_blank\" rel=\"noopener\">German<\/a>]There are users who still access Access databases with older applications via ODBC drivers. Sometimes, when switching to newer hardware\/Windows versions, access and especially performance problems occur &#8211; the database accesses are slow. A blog reader emailed me with such a case and the solution he used. The approach may be of interest to other users.<\/p>\n<p><!--more--><\/p>\n<h2>A customer with old hardware\/software<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"https:\/\/vg04.met.vgwort.de\/na\/fe046cb2209f43ada43f5dedf2e6f831\" width=\"1\" height=\"1\">One of my blog readers is a software developer who encountered massive performance issues at a customer's Access database system. This is because this customer was still using old software from the 1990s. Here's what the blog reader told me.  <\/p>\n<blockquote>\n<p>We have (had) massive access problems to existing Access databases at a customer after computer updates. The customer has been using these databases (Access 2000 format *.mdb) for ages.<\/p>\n<p>The used SW is still from the 90s and uses the 32Bit Access ODBC driver. We have offered several times to switch to SQL-Server and a newer database lib, but the customer could not make up his mind (or wants the all-embracing \"eierlegende Wollmilchsau\", which is then too expensive).<\/p>\n<\/blockquote>\n<p>I think this description sounds familiar to every service provider, everyone has experienced something similar. The old software often can't be changed over so easily, but there is a hitch when switching to a new Windows version.<\/p>\n<h2>Hardware change causes an escalation<\/h2>\n<p>It's often the case that customers have to switch to new hardware at some point, at which point they're also usually due for a newer version of Windows. And that's where the problems start. The reader describes the customer's situation like this: <\/p>\n<blockquote>\n<p>So he [the customer] has only ordered new industrial PCs and wants to run the old SW on them. Therefore only the hardware drivers were adapted and the old SW was installed.<\/p>\n<\/blockquote>\n<p>Of course, the blog reader has tested this scenario before and he wrote: <em>On various test machines, the software ran as before on the old PC under Windows 7 Professional. Database accesses ran in the blink of an eye under 2 seconds. <\/em>But, unsurprisingly for me, problems did occur, which the reader describes like this: <\/p>\n<blockquote>\n<p>On the new industrial PC running Windows 10, all database accesses are extremely slow. The network connections are ok, normal file transfers run with usual speed. <\/p>\n<p>Only SQL accesses via ODBC to the Access files on the server are extremely slow. An access can take up to 5 minutes. The computer shows no significant network or CPU activity. It simply hangs.<\/p>\n<\/blockquote>\n<p>The blog reader also told me that the problem PCs are running the latest Windows version, are fully patched, and are not running Office. <\/p>\n<h2>Problem narrowed down<\/h2>\n<p>The reader was then able to reproduce the problem in his lab and examine it more deeply. His conclusion: It seems to be solely due to the computer (in his opinion, the CPU). The new CPUs are i7-8700 with 12 logical cores. He suspects that something is blocking (some race condition perhaps) because the CPU is too fast. <\/p>\n<h2>A workaround helps<\/h2>\n<p>At this point, the reader has developed a workaround, which he shares with the readership &#8211; ultimately it is about slowing down the faster processor for database accesses. In his particular case, the following measures provided the solution: <\/p>\n<ul>\n<li>Reduced the number of threads in the driver to 1 (!)\n<li>Set the number of used processors in the program to 1 (this can also be done via Taskmanager under \"Details\", \"Set membership\", but then only for the current instance)\n<li>Switched to the 2010 Access driver (maybe not absolutely necessary, but it seemed to help a bit)<\/li>\n<\/ul>\n<p>After that, the program ran normally again. To the first point, to reduce the number of threads in the driver to 1, the reader sent me the following hint: <\/p>\n<blockquote>\n<p>Restrict threads in the driver: <\/p>\n<p>[open] ODBC manager and then [select] advanced options <\/p>\n<p>[[then the number of threads can be predefined on the System-DSN tab (see screenshot)] <\/p>\n<p>Adjust path to the DB best in the registry<\/p>\n<\/blockquote>\n<p><img decoding=\"async\" title=\"ODBC settings\" alt=\"ODBC settings\" src=\"https:\/\/i.imgur.com\/gLeQ2ID.png\"> <\/p>\n<p>At this point my thanks to the reader. Maybe it will help someone someday.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[German]There are users who still access Access databases with older applications via ODBC drivers. Sometimes, when switching to newer hardware\/Windows versions, access and especially performance problems occur &#8211; the database accesses are slow. A blog reader emailed me with such &hellip; <a href=\"https:\/\/borncity.com\/win\/2022\/07\/21\/solution-for-access-performance-issues-with-an-access-database-using-an-odbc-driver\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[463,11,1547],"tags":[1782,47],"class_list":["post-25714","post","type-post","status-publish","format-standard","hentry","category-issue","category-office","category-software","tag-access","tag-issue"],"_links":{"self":[{"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/posts\/25714","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/comments?post=25714"}],"version-history":[{"count":0,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/posts\/25714\/revisions"}],"wp:attachment":[{"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/media?parent=25714"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/categories?post=25714"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/tags?post=25714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}