Showing posts with label Outlook. Show all posts
Showing posts with label Outlook. Show all posts

Outlook 2010 Auto Complete Cache Corruption

A while back, I had written a fairly complete article on restoring the Outlook auto complete cache and working with .NK2 files.  Well, just when we thought that we could all return home in a victorious Napoleonic march, our enemy defeated, our pals down in Redmond reminded us all of Waterloo.

Outlook 2010, has completely done away with .NK2 files and has unfortunately replaced it with a system that seems far from bulletproof. My recent experiences, along with thousands of others on the net, suggests that the new system is rather prone to corruption and cannot be easily fixed.

But first, in a bid to dispel some of the misinformation out there, let me briefly go over how the new system works.

Users first using Outlook 2010, or syncing it to an active sync device are immediately going to notice a new set of contacts called suggested contacts that has been auto created upon opening a new mail account.  Inside, they will quickly notice that it is populated with email addresses of people whom they may not even remember having contact with. One soon realizes that this is a contact list that is being generated based on emails that have been sent out and incoming emails that do not have a proper contact in Outlook.  This idea, actually, seems to make a lot of sense as it is an easily backed up way of managing all of those contacts that were previously stored in the Auto complete cache’s .NK2 file.  It would be easy to come to the conclusion that this is the same thing as the .nk2 cache and this is what populates it. This, however, is wrong.  While it does store similar information, there is in fact a new .dat file that has taken the place of the venerable .NK2 file, but now has a GUID attached to it that is,ostensibly,l generated based on characteristics of the profile.  Apparently, this file can be transferred around just as was done with .NK2 files, but you would have to rename it with the exact same corresponding GUID for it to work. Definitely, not as slick as the simple renaming it to the name of the profile as in previous versions of Outlook. This won’t, however, be an issue if you have transitioned to Exchange 2010 as the file is actually stored on the Exchange server and synced back down to the client allowing for your auto complete cache to follow you as part of a new profile on a second computer.  Again, this is a great idea if it weren’t for the apparent instability of the file itself.

I have been able to find very little information on the causes of the issue, and nothing at all from Microsoft, but it appears that this file syncs itself back to the Exchange server upon closing Outlook. However, if for some reason, Outlook does not close cleanly, it appears to cut short the write of this data which subsequently corrupts the file. It is at this point extremely difficult to correct the situation. 

The file is located at %appdata%\Local\Microsoft\Outlook\RoamCache  and will be the file labeled Stream_Autocomplete_<GUID>.dat. As I stated, I have yet to come across anything that immediately fixes the issue in all cases, but here are a few things to try.

First, to verify that you are having the issue in question, you will a.) have an auto-complete cache that isn’t working and b.) a Stream_Autocomplete file that is 0 bytes in size and stays that way despite adding data to the autocomplete cache during a session. With this issue, your cache will work during the duration of Outlook being opened, but then when you close outlook and reopen it, all of the data is lost. 

Anyway, here are some methods that are known to work.

1. Delete the auto-cache data through the provided menu interface provided in Outlook.  To do this,

1. In Outlook 2010, Click the File menu and Select Options.

step1

2. In the Outlook Options window Click the Mail tab.

step2

3. Scroll down roughly halfway until you see Send messages. Uncheck the Use Auto-Complete List to suggest names when typing in the To, Cc, and Bcc lines box.

step3

2. The second method is to manually delete the file mentioned above. Make sure and close outlook before you do this, as it will have a lock on the file and prevent you from doing so otherwise.  This method is really the same as what happens above, but some people have actually reported that the file did not delete as it was supposed to from the GUI.

3. Rename then whole Roam Cache folder and reopen outlook.

4. Disable cached exchange mode and try methods 1,2, or 3 above and repeat until the file starts to grow in size.

And please, if anyone else has any more information on the actual root cause of this, please comment below so we can all get through this.  There are many possible culprits, but I suspect that over time we will find that it is one particular add-on or program that is causing the vast majority of cases.

Cheers!

Working with the Auto-Complete Cache

“Fire!!” “Earthquake!!” “Tornado!!” – all of these desperate screams for help pale in comparison to the shriek heard from end users after getting a new mail profile. As the words “Hey, my contacts are gone!!” come bellowing down the hall, many techies simply feel like packing up, retiring and heading for a more rewarding career – perhaps that of a trash collector or road sweeper. Truly, the world has come to en end if [insert_name_annoying_user_here]  has lost his contacts!

Or, maybe not. While it is true that there are few things that both irk and are more readily noticed than a missing auto-complete cache, the file itself is fairly easily managed. With a little bit of extra work, you will be able to avoid many of the pitfalls that plague IT administrators after a profile switch and you will also be able to help end users clean up or reset their cache completely.

Before we get going, however, it is worth noting that the auto-complete cache is simply that – a cache. As such, it has very little offered by Microsoft in terms of editing it and in Microsoft’s eyes is more of a temporary data repository rather than some sort of proper database. Don’t expect to get stellar support from Microsoft should this become corrupt – the official line is that all addresses should be kept in your address book or outlook contacts. As a matter of principle, I must admit that I too agree with this advice.

Nevertheless, users expect their cache to be manageable so let’s dive in and look at what can be done with this.

The cache itself is implemented in the form of a file that has the .NK2 extension and is named after the name of your outlook profile. By default, this name is likely going to be “outlook.nk2”, but be aware of other names. In Vista and Windows 7, you will find this located at:

“C:\ Users\UserName\AppData\Roaming\Microsoft\Outlook”   

in Windows XP     

“C:\ Documents and Settings\UserName\Application Data\Microsoft\Outlook”      

In order to see this file, you will have to ensure that you have enabled the display of hidden files and folders.  (Learn how:Show Hidden Files)

nk2

So, once you have the directory open, it is likely that you will not see an auto-complete cache in that folder. Outlook only creates this after an email is sent and Outlook is closed and re-opened, so go ahead and send a test message to yourself, or whoever you see fit. This will cause an entry to be written to the .NK2 when Outlook is closed and reopened. After doing this, ensure that Outlook remains closed as having Outlook open will put a lock on this file and prevent you from renaming it.    

Now, take not of the name of the new .NK2 file. You will have to find the previous one from the old profile, move it to the new directory and rename it to the exact name of the new .NK2 file you have created. Go ahead and rename the new one to profilename.bak. Rename the old .Nk2 file to the name of the newly created one. Finally, reopen outlook and you should have all of the old auto-complete entries available.

Now, given this information, one of the easiest ways of creating a brand new .NK2 cache should the old one be corrupt, is to simply follow the procedure above and just rename the .NK2 file.

Another useful tidbit, is that individual entries in an an auto-complete cache can be deleted by simply hovering over the entry in the drop down and pressing the delete key while it is highlighted.

autocomplete

In Outlook 2010, Microsoft has also added a red X with which you may delete the entry by clicking on it. You can also get a brand new cache in Outlook 2010 by using the Outlook.exe /CleanAutoCompleteCache switch. Simply cut and paste this into the run box and you will end up with a brand new cache.

If you need more extensive editing capabilities of the .NK2 cache there are several free and relatively cheap editors out there that will allow the import of entries and correction in an easy to use editor.

So don’t worry about finding a pair of overalls just yet for your new career, there really are ways of dealing with the auto-complete cache.  I hope this little tutorial helps!

Cheers!


Copyright © 2010 Paul Guenette and Matthew Sleno.