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.
| Author |
Topic |
|
kkjain
Starting Member
1 Post |
Posted - 2004-08-17 : 04:07:00
|
| Hi All,Suppose at a point of time if server get restarted while on line transaction are going on then What is the correct way to check the database consistency after recovering database.Regards,K. K. JainK. K. Jain |
|
|
Kristen
Test
22859 Posts |
Posted - 2004-08-17 : 05:52:49
|
| Like a power cut? When the server restarts it will "back out" any transactions which were not commited. No need to check for database consistency, its a "given"."recovering database" - if you RESTORE a database [I don't think that's what you meant!, but ...] then it will restore it to a consistent state - i.e. any transactions that were NOT committed when the backup was made [actually I *think* when the backup finished, but I'm not 100% sure] will not be in the restored database.Kristen |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2004-08-17 : 07:12:33
|
| There are some bad exceptions to this. If you are unfortunate enough to be on a drive system that's extremely slow, or doesn't have backup power enabled on it, or has a bad write cache you can sometimes get consistency errors in the databases after a power failure. We had horrible problems with the Compaq 4100 external enclosures, which are probably the worst enclosures ever manufactured in the history of computers. :)We fixed them by running a DBCC CHECKDB when we had the power failures. The power failures occurred in two areas. Once, we lost to the data center. A few times, the server just powered down. Everytime, we experienced corruption. We finally got the hardware replaced with an EMC SAN and a good server. We also have redundanct power supplies, circuits, battery power, and generator power now. :) They should have done that here years ago. People gripe about spending money on hardware until they lose in 10 minutes what twice they would spend on hardware.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2004-08-17 : 07:49:03
|
| So get them to have the loss early in the life of the new machinery (that you advised them not to have).I'm sure elwoos could give you a hand with the planning of this strategy!!We can even have a slogan: "Buy cheap, buy twice"Kristen |
 |
|
|
|
|
|
|
|