Share via

Clearing Cache Using vba \ ipconfig/flushdns

Anonymous
2015-01-14T19:46:39+00:00

HI,

I need all of the memory I can get.

How can I run a command line to flush the cache using vba from MS access?

Many Thanks

Kody_Devl

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Anonymous
    2015-01-14T20:07:36+00:00

    I think you been mislead on the workings of that command. The ipconfig /flushdns does not “flush” the data cache used by Access or the disk drive cache used by Access + the operating system.

    So such a command would not help nor free up any resources used by Access nor make any signification more resources available.

    In other words, the above command has ZERO relation to the workings of Access and the amounts of memory related or used by the flushdns is VERY TINY and would not effect nor help or free up any kind of resources that would help or enable to Access to run faster or better in any reasonable way I can think of.

    The DNS entries (network resolution) entries are “cached” to enhance performance, and the above simply flushes out that cache. Within several seconds of such a flush, the cache would be re-filled with the DNS entries again. In other words, such a command will flush out a VERY small cache, and re-load it. (say if a web site was moved to a different server – your ip resolution to that web site would be re-loaded).

    Regardless, that cache and resources used is VERY tiny. The “act” of having an option to flush that IP cache was NEVER for the concept of freeing up resources, but only to force a RE-LOAD of the cache. So this is certainly not something that frees up resources, but only in effect forces a re-load of that resource.

    At the end of the day that IP resolution system is not seen or used or does anything that would effect or be relevant to Access in terms of resources used, or being freed up in any way that affects operation of Access.

    You can certainly execute the above command from VBA with by using the VBA shell() function, but use of such a command would not help nor release any resouces that would help or improve access operation.

    Are you saying when you execute this command manual at the command prompt, then noticeable resources are freed up? (fire up task manager to view free memory). Then simply execute your above ip command and look at free memory. I betting you will NOT see or notice a increase in free memory.

    Regards,

    Albert D. Kallal (Access MVP)

    Edmonton, Alberta Canada

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2015-01-15T14:09:26+00:00

    Albert,

    Thank you so much for the explanation.  Your suspicions were correct and I was also suspicious but desperate as I will explain .  I did your test and you were also correct about the results.

    I have a very intensive update procedure on a large MS Access database. The Physical Memory (as reported by task manager on my machine (on 4 gigs of ram)  runs about 50% (with virtually no other APPs open (whatever is running at startup)).

    When I open this database, my Physcal Memory climbs to 65% useage. 

    If I run the procedure, starting at 65% it will run every time but takes about 15 minutes (I got this processing time down from 6 hours).

    The problem is that if I open any other Apps or databases during this 15 minute window, I will almost always get an "Exceeded resources" (3095 I think) error as it appears to run out of RAM (though not explicitly stated).

    I am close to handing this off to the users and don't want the users to have to deal with this error or have to stop working every time that they need to update the statistics in the database (which might be 4 times per day or more).

    I am trying to do everything I can think of to reduce the RAM needed to do this 15 mIn update. 

    If I start and start and stay at a 65% baseline.  I am OK.  If other programs cause me to start at a 75 to 80% baseline, I won't make it.

    I have some public variables but the the memory loss seems to go out window during large records updates using queries that I optimize to get the overall processing speed up to 15 Minutes.

    If I do 4 updates a day, that is 4x15 = 1 Hour of coffee breaks!

    It is like a camel with two humps.  You push one hump down, and the other hump raises up and you gain nothing.

    I can't think of a program that I since I started in 1990 that I have had this problem and couldn't find a way around it.

    Your thoughts.

    PS Resource Monitor is not available on this machine and has been locked out by IT.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2015-01-14T20:00:50+00:00

    Use the Shell command, see: https://support.microsoft.com/kb/116384

    Was this answer helpful?

    0 comments No comments