Re: Database files and power failures
  Home FAQ Contact Sign in
microsoft.public.windowsxp.embedded only
 
Advanced search
POPULAR GROUPS

more...

microsoft ... embedded Profile…
 Up
Re: Database files and power failures         


Author: Gert Leunen
Date: Aug 29, 2006 03:36

You may want to disable write caching on your volumes. We also use MSDE on
our products and they are never being shut down properly "without having
problems with file corruptions". You can turn it off by opening a volume's
property page, go to the Hardware tab, open the hard drive(s)'s properties,
go to the policies tab and disable the write cache. Preferrably, you make a
script that enumerates all hard drives and turns the caching off, which you
schedule to run after cloning.

When you make a backup of the database, you will still need to flush the
volume...

Best regards,
Gert Leunen
Software Engineer
R&D International NV
Show full article (0.91Kb)
4 Comments
Re: Database files and power failures         


Author: Lucvdv
Date: Aug 29, 2006 08:02

On Tue, 29 Aug 2006 12:36:55 +0200, "Gert Leunen"
wrote:
> You may want to disable write caching on your volumes. We also use MSDE on
> our products and they are never being shut down properly "without having
> problems with file corruptions". You can turn it off by opening a volume's
> property page, go to the Hardware tab, open the hard drive(s)'s properties,
> go to the policies tab and disable the write cache. Preferrably, you make a
> script that enumerates all hard drives and turns the caching off, which you
> schedule to run after cloning.

It may sound strange, but that option only disables a harddisk's own
internal cache, not windows's write cache.

http://support.microsoft.com/?kbid=233541

Disabling it allows journaling file systems like NTFS to keep tight control
of the exact order sectors are written in, to enhance their built-in crash
resistance at a performance cost.

It doesn't really make that much difference. Powering down without
experiencing corrupt files is not at all unusual, if you use NTFS-formatted
disks. NTFS was designed from the ground up to better resist such
treatment.
Show full article (1.56Kb)
3 Comments
Re: Database files and power failures         


Author: Gert Leunen
Date: Sep 4, 2006 05:26

> It may sound strange, but that option only disables a harddisk's own
> internal cache, not windows's write cache.

That's correct, that's why you still need to flush the volume after writing.
> It doesn't really make that much difference. Powering down without
> experiencing corrupt files is not at all unusual, if you use
> NTFS-formatted
> disks. NTFS was designed from the ground up to better resist such
> treatment.

True, but before we started disabling the caching, we received reports
(although rare) that systems were unable to start (blue screen during boot)
after a power down. We haven't heared of such reports since we turned it
off.
> A problem both still have in common is that bad sectors can be created
> when
> the power drops when the drive is half way through writing a sector.
> Whether it can continue to the end of the sector on stored energy in the
> capacitors on the drive's control board or not, is out of the OS's
> control.
Show full article (1.33Kb)
2 Comments
Re: Database files and power failures         


Author: JS
Date: Sep 7, 2006 10:57

"Davide" discussions.microsoft.com> wrote in message
news:31B132FA-C379-4B5B-B881-EE6523D2782D@microsoft.com...
> OK. I understand the mechanisms of writeback and so.
> I understand the advantages of EWF, but on the partition where I have the
> MDF file I cannot enable EWF because all the database changes will be lost
> after restart.
>
> I appreciate the suggestion to use NTFS file system on this volume and
> also
> the periodically backup of the database itself with a commit (using API)
> on
> that volume. The only open question is: how can I decide
> (programmatically) ,
> at the system restart, if the databse MDF file is corrupted? If it is
> corrupted the database server cannot access it and I must make a restore
> of
> the latest backup.
>

Try the TSQL command:
Show full article (0.84Kb)
no comments
Re: Database files and power failures         


Author: Lucvdv
Date: Sep 11, 2006 07:12

On Thu, 7 Sep 2006 07:06:02 -0700, Davide
discussions.microsoft.com> wrote:
> OK. I understand the mechanisms of writeback and so.
> I understand the advantages of EWF, but on the partition where I have the
> MDF file I cannot enable EWF because all the database changes will be lost
> after restart.

IIRC, you said in your initial message that you're using CF - CompactFlash?

I already said so in an earlier message, but you didn't react: you do NOT
want to use CompactFlash without EWF, believe me :)
no comments

RELATED THREADS
SubjectArticles qty Group
Reading database file and writing to a buffermicrosoft.public.windowsce.app.development ·