SQL Compact Edition database corruption

Posted by jdv on Stack Overflow See other posts from Stack Overflow or by jdv
Published on 2010-03-16T18:57:20Z Indexed on 2010/03/16 19:11 UTC
Read the original article Hit count: 234

Filed under:
|

Hi,

Our product is using MS SQL Compact Edition on a Windows machine (laptop). It's basically a metadata index for files we have on the filesystem. Recently we have seen databases getting corrupted.

This happens when the machine is very busy moving files around and has to do a tiny bit of database changes at the same time.

I was somewhat shocked that was at all possible. It was my expectation that the database would stay coherent whatever the circumstances.

Of course we are doing something wrong. Things we have checked so far are:

  • Use of only one db connection per thread
  • specify the maximum size when opening the database

The database is accessed only by one application, a .net based windows service. Are there other gotcha's?

© Stack Overflow or respective owner

Related posts about sqlce

Related posts about .NET