Lost MDF file but I have LDF file

  • westbrook.chris (12/5/2008)


    Ok, here's a hypothetical. What if:

    a) Recovery model was set to Full

    b) No database backups were ever done

    c) No transaction backups were ever done

    d) No activity was performed in the database that didn't get logged in transaction log

    e) Not other activity caused the transaction log to be truncated

    Wouldn't it be theoretically possible then that the database could be recovered? Of course as soon as one of the above was not true, this would be impossible. But since it sounds like there haven't ever been any backups..just maybe...

    -cmw

    Nope, this will not work because the transaction log does not keep the transactions until the database has been backed up at least one time.

    Jeffrey Williams
    Problems are opportunities brilliantly disguised as insurmountable obstacles.

    How to post questions to get better answers faster
    Managing Transaction Logs

  • No - because of condition (b) that you specified. If the database is switched to FULL recovery model, but a database backup isn't done, then the database stays in a pseudo-SIMPLE recovery model - where the log is cleared on checkpoint. It's not until the first database backup has been done that the database *really* switches to the FULL recovery model where the log cannot be cleared until a log backup has been taken.

    This is explained in Books Online at Considerations for Switching from the Simple Recovery Model

    Thanks

    Paul Randal
    CEO, SQLskills.com: Check out SQLskills online training!
    Blog:www.SQLskills.com/blogs/paul Twitter: @PaulRandal
    SQL MVP, Microsoft RD, Contributing Editor of TechNet Magazine
    Author of DBCC CHECKDB/repair (and other Storage Engine) code of SQL Server 2005

  • We can't do anything with out MDf file.

  • Somethign that I recommend to everyone that I come across when it comes to losing or accidentally deleting items such as DB's... is "Active Undelete" from Active Data Recovery Software... this little program is fairly cheap and works wonders when you have an issue such as losing your MDF.

    Search Google for Active Undelete...

  • Well, if not the DB backup..there should be tape backups of the drives on which these files were placed.. I restored one of my MDF files from the tape which had copy of the mdf file as there was no backup...and then you can just do attach with this new file...without this, the DB is lost completely..sorry to hear that...

    Thanks!!

    The_SQL_DBA
    MCTS

    "Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives."

  • Heh. Only 20 replies, but over 2400 views on this thread...

    So, lest the extremely important lesson of this discussion might be lost on any of the lurkers out there, allow me to repeat it explicitly this time:

    [h2]If your data is important to you then Back It Up![/h2]

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • [h2]If your data is important to you then Back It Up![/h2]

    NB. This is not covered by

    RAID 1 - as proved recently

    or

    The directories holding the files are backed up by the network guys every night.

    If you're relying upon either of these, it'd be wise to ensure your CV is backed up rather more securely

  • Andrew Gothard (1/7/2009)


    [h2]If your data is important to you then Back It Up![/h2]

    NB. This is not covered by

    RAID 1 - as proved recently

    or

    The directories holding the files are backed up by the network guys every night.

    If you're relying upon either of these, it'd be wise to ensure your CV is backed up rather more securely

    or ANY RAID version. RAID is NOT a backup solution....

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • RBarryYoung (12/31/2008)


    [h2]If your data is important to you then Back It Up![/h2]

    And to add to that.

    Any backup not tested cannot be considered a valid backup. If it's worth backing up, it's worth testing the restore.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • My font is bigger than your font

    Sorry - that was unnecessary, but can we tone down the fonts.

  • Matt Miller (1/7/2009)


    Andrew Gothard (1/7/2009)


    [h2]If your data is important to you then Back It Up![/h2]

    NB. This is not covered by

    RAID 1 - as proved recently

    or

    The directories holding the files are backed up by the network guys every night.

    If you're relying upon either of these, it'd be wise to ensure your CV is backed up rather more securely

    or ANY RAID version. RAID is NOT a backup solution....

    As the journalspace.com debacle shows (the one I was alluding to)

  • GilaMonster (1/7/2009)


    RBarryYoung (12/31/2008)


    [h2]If your data is important to you then Back It Up![/h2]

    And to add to that.

    Any backup not tested cannot be considered a valid backup. If it's worth backing up, it's worth testing the restore.

    Personally - I'd go even further. Unless you have a FULL DR strategy - and this includes regular tests bringing your system(s) back from the network backups and database backups on a virgin box - or have tested your remote facility failover, AND business management are up to date on the implications in terms of the duration of service disruption so they can plan accordingly, you have no worthwhile strategy at all. Until it's tested, documented and measured - it's still cross your fingers and hope for the best.

  • Michael Earl (1/7/2009)


    My font is bigger than your font

    Sorry - that was unnecessary, but can we tone down the fonts.

    Heh. Sorry Michael, if I had know that it was going to get quoted so many times I would have used a smaller font! 🙂

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • Go to media recovery company and try to see if they can recover the mdf..thats the ONLY HOPE...

    HOPING AGAINST HOPE...

  • I was playing with a new LUN and forgot to backup my test database before I rebuilt the LUN. Now I have a database entry in SSMS, it still shows up in sysdatabases, but it is gone forever. No mdf (the ldf was on a different lun).

    I just want to clear it out of SSMS - any ideas? Can't drop it, can't detach it. I really don't want to edit master, but I don't want to look at this dead DB either.

    Any ideas?

    Thx.

Viewing 15 posts - 16 through 30 (of 40 total)

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