Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Data Corruption Issues
 Data gets corrupted on power loss

Author  Topic 

bharath_kolanda
Starting Member

6 Posts

Posted - 2009-09-23 : 06:37:39
Hello EveryOne,

I am Bharath kumar, new to this forum. My application is opening the connection to SQlExpress while starting and closing the connection before closing the application. When the application is running, and if some power loss happens, my database is getting corrupted. When i open next time it is showing a message that, the database was not properly shutdown. There is a solution to recover this corrupted database, which i read in some other forum. Is there a way to avoid this to happen?

Regards,
Bharath kumar.K

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-09-23 : 06:39:47
Install an UPS.


N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

bharath_kolanda
Starting Member

6 Posts

Posted - 2009-09-23 : 06:41:56
Thanks for your reply boss. I am expecting an answer other than this.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-09-23 : 06:46:26
What answer do you expect?


N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

bharath_kolanda
Starting Member

6 Posts

Posted - 2009-09-23 : 06:55:41
Is there any setting with in the database which will recover automatically?
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-09-23 : 06:59:20
It depends on what you mean with recover?
A restore?
A database repair?

The better option is to see that doesn't happen at all.



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

Techtiger4
Starting Member

3 Posts

Posted - 2009-09-23 : 08:28:29
First of all I would like to suggest you to establish Power backup. I am suggesting this because due to abrupt system shut down SQL database generally gets corrupted. Now, you have two solutions:

1. Recover the data stored in the damaged database through backup if you have any.
2. Repair the damaged database with any SQL database repair and recovery software. One of the best known SQL database repair software that you can use is Kernel for SQL.
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2009-09-23 : 16:34:22
SQL data files do not generally get corrupted on abrupt shutdowns unless the drive is using non-battery backed cache and some of the data been written never makes it to disk.

I've personally never heard of any SQL data recovery tool that does a better job than the internal tools.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2009-09-23 : 16:37:35
quote:
Originally posted by bharath_kolanda

When the application is running, and if some power loss happens, my database is getting corrupted. When i open next time it is showing a message that, the database was not properly shutdown.


What's the exact error message?

The solution here is to install a UPS and/or ensure that any write-cache on the disks it properly battery-backed.

I don't see why the suggestion of a UPS is not valid. I'm typing this in the middle of a general power failure with my PC and server running on UPS. That's at home. A business should take the same precautions with their hardware.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

Davidpoul
Starting Member

14 Posts

Posted - 2009-11-11 : 04:09:25
Use your backup to restore your data. If you don't have the backup than use DBCC CHECKDB to repair your database and than try to open it. Even you are not able to open your database than it means that your database get corrupted and you need to repair it by using third party sql recovery tool. There are lots of such tool. I like to suggest you to download http://www.repair-mssql-database.com/download-sql-database-repair-software.php
First try the demo version, if you satisfied with the result than go for full version.

David Poul
http://www.mssqldatabaserecovery.com
Go to Top of Page
   

- Advertisement -