Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Erland Sommarskog Newsgroups: comp.databases.ms-sqlserver Subject: Re: power loss DB corruption Date: Fri, 25 Apr 2014 12:24:40 +0200 Organization: Erland Sommarskog Lines: 23 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Injection-Info: mx05.eternal-september.org; posting-host="8233196d5c0b806a16082369a965bcbe"; logging-data="32580"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18oMKzpFC6LfzPjFL+zXpeA" User-Agent: Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32) Cancel-Lock: sha1:PUou67VU6Akl1XXcSKf8sbfG50s= Xref: csiph.com comp.databases.ms-sqlserver:1740 Hendrik van der Heijden (hvdh@gmx.de) writes: > I have a standard consumer PC (single SATA drive on Intel Chipset > Controller) running Windows 7 and MS SQL Server 2012 Express. > > When I load the database with transactions and pull the PC power cord, > due to ACID compliance, I expect to get no data loss on reportedly > completed transactions. However, on SQL Server 2012 very often the > database is corrupt afterwards and cannot be used anymore. If you pull the power cord, there are some risk for incomplete writes, isn't there? What is important if you want to minimize data loss is to use the full recovery model and frequent transaction log backups. Note that if the data file is damaged in case of a power outage, but the log file is not, you can recover the database by taking a tail-of- the-log backup. If the log file is damaged, the prospects are bleaker, even if the database is not. -- Erland Sommarskog, Stockholm, esquel@sommarskog.se