Database recovery

  • Hi,

    My .mdf file is accidentally deleted at client's place and without bothering the system is also being used for more than a week. So system file recovery was not successful. I do have log (.ldf) file. can we recover data from the .ldf file... I do have the schema script if that helps. Backup files are also not available.

    Please suggest.

    Thanks & Regards,

    Sharath

     

     

  • No you need to MDF and LDF or a backup.

    You will need to create a blank DB using the schema script, but all your data is lost.

  • sharathgt wrote:

    Hi,

    My .mdf file is accidentally deleted at client's place and without bothering the system is also being used for more than a week. So system file recovery was not successful. I do have log (.ldf) file. can we recover data from the .ldf file... I do have the schema script if that helps. Backup files are also not available.

    Please suggest.

    Thanks & Regards,

    Sharath

    This makes no sense.   The only way an .mdf file could have been deleted would be if the SQL Server service was shut off or if the database was detached.   You would have received an error that the file was in use otherwise.

    Does the database appear in SSMS?  If you right click on "Databases" in SSMS, "Attach" should appear.  Does it show up in there???

     

    Michael L John
    If you assassinate a DBA, would you pull a trigger?
    To properly post on a forum:
    http://www.sqlservercentral.com/articles/61537/

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

  • SSMS do show the DB without giving any access to it when we click on it... It says .mdf is missing.

    As I said, the DB resides in a client PC. So I really do not have control over that. So no error, nothing is observed and the client is not so literate about any such things...

    True that server must be off or the DB must be offline for file deletion... but don't know much about this... I doubt some foul play...

    We did all physical data recovery using few recovery software but no luck...

    My only choice was " If I can recover data from an LDF file to an empty schema "... If it's a Definitely "No".. then I will move on...

    Thanks much for the time...

     

    • This reply was modified 1 year, 2 months ago by  sharathgt.
  • It sounds to me like someone may have tried to move the database files and failed to do it correctly.  The MDF file may still exist someone on one of the drives the server used.  If you can find it, come back and we'll tell you the steps to "reattach" the database.

    If you can't find it, you'll need to restore it from backups.  I don't need to tell you what will happen if backups weren't happening in an automatic fashion.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

Viewing 12 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic. Login to reply