Notices

Great community. Great ideas.

Welcome to ASP/Free, a community dedicated to helping beginners and professionals alike in improving their knowledge of Microsoft's development and administration technologies. Sign up today to gain access to the combined insight of tens of thousands of members.

Thread: My MDF File is Corrupted

Results 1 to 14 of 14
Share This Thread →
  1. #1
    jetchan is offline Registered User
    Join Date
    Aug 2012
    Posts
    7
    Rep Power
    0

    My MDF File is Corrupted

    Hi All,
    I am in a problem with my SQL Server actually I am using a sql server 2005 and all the data store in my sql database in the form of .mdf file but few days ago my .mdf file is not open properly and it's seems blank while I store so much data in my database and when I talk to admin according to my problem he says that the mdf file is corrupted can you please help me to how recover my data I am so much appreciate of your kind help.

  2. #2
    gk53's Avatar
    gk53 is offline Contributing User
    Join Date
    Mar 2005
    Location
    Columbus, OH
    Posts
    1,538
    Rep Power
    278
    I hope you have database backup. If so you can restore database from backup, you will lost data from last backup to database crash, but it wold be the best option. Another question Is your transaction log files still good? If they are not corrupted you can after restoring database from backup you can restore from transaction log up to crash time and your data lost will be minimal... God luck
    GK
    __________________________________________________ _____
    if you found this post is useful click Give Rep button (bottom side on this reply ) and agree

  3. #3
    jetchan is offline Registered User
    Join Date
    Aug 2012
    Posts
    7
    Rep Power
    0

    Thank you for Reply

    Quote Originally Posted by gk53
    I hope you have database backup. If so you can restore database from backup, you will lost data from last backup to database crash, but it wold be the best option. Another question Is your transaction log files still good? If they are not corrupted you can after restoring database from backup you can restore from transaction log up to crash time and your data lost will be minimal... God luck
    Dear Gk,

    Thank you very much for your valuable response i want to told you that i have backup of database but not sure it's corrupted or not because there are some error occur when going to open database but my log file is in working condition.

    Now please tell me how can i recover it.

    Thanks

  4. #4
    gk53's Avatar
    gk53 is offline Contributing User
    Join Date
    Mar 2005
    Location
    Columbus, OH
    Posts
    1,538
    Rep Power
    278
    Restore database from backup into new database.
    Is that works? Below link with instructions of how to do that
    http://www.tech-recipes.com/rx/2081/sql_server_2005_how_to_restore_database_backup/

  5. #5
    jetchan is offline Registered User
    Join Date
    Aug 2012
    Posts
    7
    Rep Power
    0

    Re:

    Hi Gk,

    Once again thank you for your reply the link provided by you is very useful and i try my best to restore my database backup but i am fail to do this.

    I can't restore database from my backup.
    Have you any other way to restore database.
    I read something about data recovery software in internet but not understand well if you have any idea about this please give me.

    Thanks

  6. #6
    gk53's Avatar
    gk53 is offline Contributing User
    Join Date
    Mar 2005
    Location
    Columbus, OH
    Posts
    1,538
    Rep Power
    278
    if your corrupted database still online you can try to recover by

    ALTER DATABASE yourDatabaseName
    SET emergency
    GO
    ALTER DATABASE yourDatabseName
    SET single_user
    GO
    DBCC checkdb (yourDatabaseName, repair_allow_data_loss)
    ALTER DATABASE yourDatabaseName
    SET multi_user
    GO

    If that will not help probubly you lost your database
    You should have database backup plan (usially it is multiple jobs), wich should include full backups and backup of transaction log and keet a few backups avaliable for data recovery. On my servers I usially run full back up every night and stor 7 last full back ups for recovery on the same drive and off the system and on top of that I running backup of transaction log every 15 min, so in case of emergensy like you have you should be able to find good full db backup, restore database, and after that restore database from transaction log as close as you can before crash time, in my scenario it is 15 min... This is what you should consider for future

  7. #7
    jetchan is offline Registered User
    Join Date
    Aug 2012
    Posts
    7
    Rep Power
    0

    Re:

    Quote Originally Posted by gk53
    if your corrupted database still online you can try to recover by

    ALTER DATABASE yourDatabaseName
    SET emergency
    GO
    ALTER DATABASE yourDatabseName
    SET single_user
    GO
    DBCC checkdb (yourDatabaseName, repair_allow_data_loss)
    ALTER DATABASE yourDatabaseName
    SET multi_user
    GO

    If that will not help probubly you lost your database
    You should have database backup plan (usially it is multiple jobs), wich should include full backups and backup of transaction log and keet a few backups avaliable for data recovery. On my servers I usially run full back up every night and stor 7 last full back ups for recovery on the same drive and off the system and on top of that I running backup of transaction log every 15 min, so in case of emergensy like you have you should be able to find good full db backup, restore database, and after that restore database from transaction log as close as you can before crash time, in my scenario it is 15 min... This is what you should consider for future

    Hello GK,

    Thank you so much i just going to do what you describe all points on above lets see i get back my database data or not.

    Thanks

  8. #8
    jetchan is offline Registered User
    Join Date
    Aug 2012
    Posts
    7
    Rep Power
    0

    Re:

    Quote Originally Posted by markwillium
    Hello Jetchan,

    DBCC CHECKDB with repair_allow_data_loss command is the last free method to repair corrupt mdf file but you may end with some data loss. If your data is most precious for you and you can't effort any single data loss then you should use 3rd party mdf repair software. There are so many mdf repair software available online but Stellar Phoenix SQL recovery is the best for you.
    Hi Mark,

    Sorry but not understand which type of command you are talking about can you please explain and about third party i read your suggestion thank you for this.can you please give me some other idea.

  9. #9
    markwillium is offline Registered User
    Join Date
    Aug 2011
    Posts
    5
    Rep Power
    0
    Quote Originally Posted by jetchan
    Hi Mark,

    Sorry but not understand which type of command you are talking about can you please explain and about third party i read your suggestion thank you for this.can you please give me some other idea.
    I am talking about a command that is also mentioned by GK

    "ALTER DATABASE yourDatabaseName
    SET emergency
    GO
    ALTER DATABASE yourDatabseName
    SET single_user
    GO
    DBCC checkdb (yourDatabaseName, repair_allow_data_loss)
    ALTER DATABASE yourDatabaseName
    SET multi_user
    GO"

    It repairs corrupt mdf file with minimum data loss.

  10. #10
    jetchan is offline Registered User
    Join Date
    Aug 2012
    Posts
    7
    Rep Power
    0

    Re:

    Quote Originally Posted by markwillium
    I am talking about a command that is also mentioned by GK

    "ALTER DATABASE yourDatabaseName
    SET emergency
    GO
    ALTER DATABASE yourDatabseName
    SET single_user
    GO
    DBCC checkdb (yourDatabaseName, repair_allow_data_loss)
    ALTER DATABASE yourDatabaseName
    SET multi_user
    GO"

    It repairs corrupt mdf file with minimum data loss.

    Dear Make,
    I have no more idea about commanding language and my support team do this for me and they already use these command as it discuss above by GK.now i am searching for any application which recover my data have you any information according this type of problem.

  11. #11
    markwillium is offline Registered User
    Join Date
    Aug 2011
    Posts
    5
    Rep Power
    0
    Have you tried the application that I have mentioned above? If not then try it now. You can download it from Stellar Phoenix office website.

    Repair Steps:
    Download free demo version
    Run on your computer
    Shutdown SQL server
    Copy your mdf file to another location
    Start SQL server
    Scan copied file with Stellar phoenix SQL recovery
    See the preview of your data
    If you can see your data then buy the software to save it.

  12. #12
    jetchan is offline Registered User
    Join Date
    Aug 2012
    Posts
    7
    Rep Power
    0

    Re:

    Quote Originally Posted by markwillium
    Have you tried the application that I have mentioned above? If not then try it now. You can download it from Stellar Phoenix office website.

    Repair Steps:
    Download free demo version
    Run on your computer
    Shutdown SQL server
    Copy your mdf file to another location
    Start SQL server
    Scan copied file with Stellar phoenix SQL recovery
    See the preview of your data
    If you can see your data then buy the software to save it.
    Hey Mark,

    Thanks for suggestion i will sure check the application provided by you and if it's work may be possible i can tack it.by the way i already download this software which is demo version let's see what happen next .

  13. #13
    markwillium is offline Registered User
    Join Date
    Aug 2011
    Posts
    5
    Rep Power
    0
    Quote Originally Posted by jetchan
    Hey Mark,

    Thanks for suggestion i will sure check the application provided by you and if it's work may be possible i can tack it.by the way i already download this software which is demo version let's see what happen next .
    I hope that you will have your data. If you have found any problem during repair process then share with us. Good Luck

  14. #14
    jenjeniffer is offline Registered User
    Join Date
    Sep 2012
    Posts
    1
    Rep Power
    0

    Repair and Restore MDF Database Easily

    Hello smith, if your SQL database files have gone under corruption issues, then at first you need to try the inbuilt command that is DBCC CHECKDB that is used to check the logical and physical consistency of all the components of SQL database and can resolve minor corruptions.

    But, if in case SQL database if still inaccessible, the the use of third party database recovery software must work to fix the SQL corruption and recover your corrupted components of the database safely. You can try the demo version of MDF Repair tool for free that can efficiently resolve all kinds of issues related to SQL database.
    For more info, you can visit : Repair Corrupted MDF File By MDF Repair Tool

    Hope, you will recover all of your files safely.

Share This Thread →

Become Part of This Conversation

Join NowFor Free!

Similar Threads

  1. IIS 6.0 Crashing Daily on Production Server
    By JMelsoner in forum Microsoft IIS
    Replies: 5
    Last Post: April 12th, 2006, 05:43 PM
  2. problem displaying updated XML file
    By mat106 in forum ASP Development
    Replies: 0
    Last Post: September 15th, 2004, 06:24 AM
  3. File system object and storing output in a CSV file
    By Beelzibub in forum ASP Development
    Replies: 0
    Last Post: March 23rd, 2004, 06:42 PM
  4. manage file
    By Steve Schofield in forum ASP Development
    Replies: 0
    Last Post: June 27th, 2001, 10:44 PM

ASP Free Advertisers and Affiliates