Saturday, October 6, 2007

Folder Redirection of database files causes corruption!

My blog articles so far have to do with User Files Folders and using Folder Redirection to move them to servers. If you are considering doing this in your environment, there is something you should know -- redirecting a database file and then modifying it will corrupt it. This is a current phenomenon that is very easy to reproduce:

  1. Put a database file in a redirected folder (that has Offline Files enabled by default).
  2. Modify the database.
  3. Witness the corruption.
Microsoft is aware of the problem and a fix is to be included in Service Pack 1 (SP1). If you wish to implement Folder Redirection before SP1 is scheduled for release (December timeframe), contact Microsoft and request a custom patch that includes the required fix. It should be easy to get because I have already made that request and received my patch.

Time for a rant. If ever there was proof that Vista was rushed out the door, this is it. If ever there was proof that there is slow uptake of Vista by enterprise clients, this is it. Let me explain...

Typically when Folder Redirection is used, Offline Files is also used since it is the default configuration. Offline Files maintains a local cached copy of the redirected data files. This ensures maximum reliability and speed but requires that the local cached copy be synchronized with the network copy. Under Windows XP, database files were excluded from the synchronization process due to their likely large size and were forced to remain on the server only. This caused problems for laptop users who counted on the Offline Files feature to give them access to their network files while away from the network. Vista introduces a new feature of Offline Files called "Bitmap Differential Transfer" (BDT). BDT allows Vista to support the synchronization of all file types, including databases, because it does a block-by-block synchronization and it no longer needs to synchronize an entire file every time. Here is one Microsoft site promoting the feature. Here is a blog that discusses the feature as well. The problem is that the feature just doesn't work - at least it didn't work at my client site and Microsoft support easily reproduced it as well. I was able to witness the corruption by simply creating an Access database in a redirected folder and then modifying it by moving a button control on a form. Within minutes I had Access spitting out all sorts of random error messages. In my book, if a new product's "feature" just doesn't work (no strange arrangement of bits required), then it was rushed to market.

Now here's the bit that has shocked me. I found a glaring problem. It was easily reproduced. There has been no mention of it on the internet that I can find. When I got the early release of the patch destined for SP1, I was told by Microsoft that I would be the first client trying it. This was September. How is it possible that the product has been out for eight months and no one is reporting it or receiving support to fix it? I can only surmise that Folder Redirection is being used only by the larger clients who are having trouble with the implementation of Windows Vista - they have yet to deploy the product to users who might think of putting a database in one of the redirected user folders and attempt to modify it.


Phil Birnbaum said...

It's odd sometimes that you're doing something that seems completely routine, only to find you're the first one to do it.

It happens a lot more often than you'd think ...

Gordon Martin said...

Yes, it's good to be reminded how small the world is sometimes. It was this incident that made me realize how little Vista information is out there and that I could make a difference with a blog like this. said...

Since Microsoft's Offline Files feature has always had few features, I use a third-party program ( that has lots of features and few known problems. In some ways it may not be as sophisticated as Microsoft's latest version in Windows Vista, but it does give you much more flexibility as to which files and folders to copy, how to determine differences, when to synchronize, how to backup, etc.

Gordon Martin said...

Interesting. It seems to have quite some good reviews as well. The price is certainly reasonable.

The big advantage that Microsoft's Offline Files feature has is it's ability to fool the OS. A laptop can think it is accessing redirected profile folders on the network even if the user is disconnected. A neat trick.

Smartsync looks like it would be a more useful solution for other data folders that the user might have though. The extra control would certainly be nice. said...

I have also run into the problem with Microsoft Access database corruption when synchronizing running Folder Redirection on a Vista computer and the user's home folder. You mentioned that you called Microsoft tech support regarding a custom hotfix and that this problem would be resolved with Vista SP1. I could not find this hotfix being addressed in the Vista SP 1 documentation, nor could I find the Microsoft article/Knowledge Base article on this subject. Could you please post more info on the hotfix article? I installed Vista SP1, but this did not fix the database corruption problem, so I am hoping that the hotfix will solve the issue. Thanks for the info.

Gordon Martin said...

Despite SP1 listing over 500 hotfixes as having been addressed - that was only the public hotfixes. There are many more unpublished hotfixes that quietly got addressed as well.

The hotfix I got from Microsoft for my problem was Windows6.0-KB941322-x86. I never found out if it went public or not - I don't think so.

We stopped deploying it to Vista machines once SP1 came out and haven't received any complaints about Database corruption.

I'm sure you know the patch wouldn't fix a file that is already corrupt - just prevent future corruption. If you are testing SP1 by upgrading a PC that already was experiencing the corruption... make sure you test with a good database file and make sure to flush the Client Side Cache so a valid one can be recreated. (Do this by setting the registry key: HKLM\System\CurrentControlSet\Services\CSC\Parameters\FormatDatabase=1 (You need to create the Parameters key) - then reboot a few times. The CSC will eventually get flushed and recreated.)