SQL Server - Windows corrupt Can i get my database

Asked By farrukh on 16-May-12 03:18 AM
HI All,


I have windows 7 which is corrupt and i have sql server installed in C drive and get the copy C drive of corrupt windows  in one external  it is possible that i install window in computer and get the database from the external drive iam very worried if some one really help me out.

Thanks
hammeed
Somesh Yadav replied to farrukh on 16-May-12 03:23 AM
1/2 Never backup a database that may already be corrupted. (if you restore it--> you'll restore a corrupted database)
Instead, export the new hands (since the last backup)
Restore the OLD (non-corrupted) backup--> import the new hands.

3 If pgadminIII shows "not responding", just ignore it, the program should unfreeze when the task is finished. Can take hours.
If you eventually get an error, it's a sign of a corrupt database.

4. go to RVG Software/HoldemManager/Importing folder/Logs folder and you can see which hands couldn't be imported and resulted in errors.

5. The 2 most common causes of this problem are: powering off your computer or having your computer lose power while the database is doing something; and an old drive with bad sectors on it.

Basically what happens is a small portion of a file gets slightly corrupt and then when you reboot and windows goes into that checkdsk procedure it finds the bad section and, thinking it is doing a good thing, removes it. Postgres then loads the table and a portion of it is gone so it doesn�t like that and blocks access to the entire table. Normally when this happens it is on a completely useless file that you�ll never even notice is now gone but quite often it will happen to an index in the DB which can easily be rebuilt but in your case it happened to one or more of the tables.

So, to protect against this

1 - Keep your hands histories in case you do need to reimport
2 - Use a power bar and avoid hard shutdowns (when you flick the power switch on the pc)
3 - If your drive is old consider replacing it with a new one. They are cheap and much faster now than even a few years ago.
Ramendra Kumar replied to farrukh on 16-May-12 05:10 AM
just find the your databasename.mdf, and databasename.ldf from the backup. now after installaing a new windows , sql try to attach database, and the select this mdf file you will got your all data, please let me know that your problem solved or not.
farrukh replied to Ramendra Kumar on 16-May-12 05:33 AM
Hi Ramendra Kumar,

Beautiful WOW thanks a lot really i have no words to say thanks i have attached all the database and all the database are working great great !


Thank you Kumar you have done a great great deal thanks alot !


hammeed
Ramendra Kumar replied to farrukh on 16-May-12 06:58 AM
you r welcome friend....