
Minimize Access 32-bit memory problems on 64-bit operating systems
Minimieren von Access 32-bit Memory-Problemen auf 64-bit Betriebssystemen
Zu viele parallel geöffnete Formulare oder Ähnliches führen oft zu "Not enough memory" oder ähnlichen Fehlermeldungen.
Diese Fehlermeldungen sind den meisten Accessusern wohl leider bekannt.
Karl Donaubauer - den meisten hier wohl gut bekannt - hat gerade bei der US Access User Group einen Vortrag über dieses Problem gehalten und darin einen
sehr interessanten Workaround (der seit mehr als 10 Jahren existiert) gepostet.
Dieser Patch bewirkt, dass auf 64-Bit Betriebssystemen der für Access verfügbare Speicherplatz (Virtual Memory) statt 2 GB satte 4 GB beträgt.
(Anmerkung von Karl dazu: > Der Punkt ist, dass es nicht (nur) um VBA geht sondern um Access als ganzes bzw. den Access-Prozess in Windows samt dazugehörenden DLLs etc. Denk an die üblichen Problemsituationen wie zu komplexe/viele Formulare, Berichte, Abfragen... es sind primär Access-Objekte, die den Speicher verbrauchen. Der VBA-Code kann da mitspielen oder auch verursachen (z.B. zu viele Recordsets öffnen), ist aber nur eine der Komponenten des Access-Prozesses. <)
MSAccess-64bit Versionen benötigen diesen Patch nicht, da der dort intern verfügbare Speicherplatz bereits ausreichend dimensioniert ist.
MS selbst liefert Excel-32bit und Outlook-32bit schon lange mit auf /LARGEADDRESSAWARE gepatchten Exe-Dateien aus.
Warum das MS Access-Product-Team MSAccess-32bit nicht ebenfalls automatisch mit bereits /LARGEADDRESSAWARE gepatchten Versionen verteilt, wird wohl immer ein Geheimnis bleiben.
Es wäre wichtig, wenn jeder Mitleser den Druck auf MS via User-Voice etwas erhöhen würde, dieses zu ändern.
Hier der Link zu Access-User-Voice - bitte sich anmelden und abstimmen.
https://access.uservoice.com/forums/319956-access-desktop-application/suggestions/32586994-make-32-bit-access-large-address-aware-laa
Zu der Lösung selbst:
--------------------
Der Aufruf (im Direktfenster von Access) > SysCmd(acSysCmdAccessDir) < liefert den aktuellen Pfad.
Mittels des Visual Studio Programms editbin.exe (oder anderer Freeware-Produkte) kann man EXE-Dateien patchen.
Beispiel-Batchscript für VS12 und Access 2010
<<<<<<<<<<<
Rem Backup der Exe-Datei erstellen
Copy "C:\Program Files (x86)\Office10\Office14\MSACCESS.EXE", "C:\Program Files (x86)\Office10\Office14\MSACCESS_Ungepatched.EXE"
Rem MSAccess.exe auf /LARGEADDRESSAWARE patchen
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\editbin.exe" /LARGEADDRESSAWARE "C:\Program Files (x86)\Office10\Office14\MSACCESS.EXE"
>>>>>>>>>>>
Der volle Pfad - sowohl für editbin.exe als auch für Msaccess.exe - muss natürlich an die eigenen Gegebenheiten angepasst werden.
Diese Zeilen - die Access.exe Datei kopieren und dann patchen - als Batch-Datei speichern und _als Admin_ ausführen.
Dieser Patch bewirkt, dass auf 64-Bit Betriebssystemen der für Access verfügbare Speicherplatz (Virtual Memory) statt 2 GB satte 4 GB beträgt.
Karl hat Dieses in seinem Vortrag ausführlich belegt. Er will die Sourcen des Vortrages verfügbar machen. (Link: Hier)
Lt. mehrerer Großfirmen, die diesem Patch bei Ihren mehr als 6.000 Office / MSAccess-32bit Installationen standardmäßig durchführen hat dies zu keiner einzigen Fehlermeldung geführt. Er wurde auf den verschiedensten 32-bit Editionen (von 2007 bis 2019 oder Office 365) durchgeführt.
Idee: Einmal MSAccess.exe patchen und dann diese gepatchte Version ausrollen.
ACHTUNG:
Änderung erfolgt immer auf eigene Gefahr. Jede betroffene MSAccess.exe-32bit Datei muss gepatched werden.
Dieser Patch verändert die MSACESS.EXE und muss ggf. nach Microsoft System-Patches (immer, wenn durch Systemupdates automatisch die MSAccess.exe ausgetauscht wurde) erneut ausgeführt werden.
-------------------------------------------
Minimize Access 32-bit memory problems on 64-bit operating systems
Too many forms or the like opened in parallel often lead to "Not enough memory" or similar error messages.
Unfortunately, these error messages are known to most access users.
Karl Donaubauer - most of whom are well known here - has just given a lecture on this problem to the US Access User Group and included one
very interesting workaround (which has existed for more than 10 years).
This patch means that on 64-bit operating systems the available storage space (virtual memory) instead of 2 GB is a whopping 4 GB.
(Comment from Karl:> The point is that it is not (only) about VBA but about Access as a whole or the Access process in Windows including the associated DLLs etc.) Think of the usual problem situations such as too complex / many forms, Reports, queries ... it is primarily access objects that consume the memory. The VBA code can play along or cause them (eg open too many recordsets), but is only one of the components of the access process. <)
MSAccess-64bit versions do not need this patch because the internal space available there is already sufficiently dimensioned.
MS itself has been supplying Excel 32bit and Outlook 32bit with exe files patched to /LARGEADDRESSAWARE for a long time.
Why the MS Access product team MSAccess-32bit is not automatically distributed with versions already patched /LARGEADDRESSAWARE will probably always remain a secret.
It would be important if every reader would increase the pressure on MS via user voice to change it.
Here is the link to Access-User-Voice - please register and vote.
https://access.uservoice.com/forums/319956-access-desktop-application/suggestions/32586994-make-32-bit-access-large-address-aware-laa
About the solution itself:
--------------------
The call (in the immediate window of Access) > SysCmd (acSysCmdAccessDir) < provides the current path.
Using the Visual Studio program editbin.exe (or other freeware products) you can patch EXE files.
Sample batch script for VS12 and Access 2010
<<<<<<<<<<<
Rem Backup der Exe-Datei erstellen
Copy "C:\Program Files (x86)\Office10\Office14\MSACCESS.EXE", "C:\Program Files (x86)\Office10\Office14\MSACCESS_Ungepatched.EXE"
Rem MSAccess.exe auf /LARGEADDRESSAWARE patchen
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\editbin.exe" /LARGEADDRESSAWARE "C:\Program Files (x86)\Office10\Office14\MSACCESS.EXE"
>>>>>>>>>>>
The full path - for both editbin.exe and Msaccess.exe - must of course be adapted to your own circumstances.
Save these lines - copy the Access.exe file and then patch - as a batch file and execute it _as Admin_.
This patch means that on 64-bit operating systems the available storage space (virtual memory) instead of 2 GB is a whopping 4 GB.
Karl has documented this in detail in his lecture. He wants to make the sources of the lecture available. (Link: here)
Lt. Several major companies that run this patch by default on their more than 6,000 Office / MSAccess 32bit installations did not result in a single error message. It was carried out on a wide variety of 32-bit editions (from 2007 to 2019 or Office 365).
Idea: Patch MSAccess.exe once and then roll out this patched version.
CAUTION:
Changes are always made at your own risk. Every affected MSAccess.exe-32bit file has to be patched.
This patch changes the MSACESS.EXE and may have to be run again after Microsoft system patches (whenever MSAccess.exe was automatically replaced by system updates).
Print article | This entry was posted by klausobd on 20.12.19 at 18:37:00 . Follow any responses to this post through RSS 2.0. |