Recover Data files from Log files to recreate Databases

  • I had a hard-drive failure which held only my Data files and the Log files are on a separate hard-drive. I don't have backup files on these databases because I found my system was corrupt and didn't backup right (I know; Bad SysAdmin!!!). Also I'm not a straight DBA I know how to do DB maintenance and basic DBA stuff but nothing fancy. I vaguely remember in Oracle that you can recreate databases from Log files. I was wondering if there is a way to recreate Data files from Log files in SQL 2008 Enterprise. If someone could help me it would be greatly appreciated!

    Also as a note this is not on a business system it's on a personal system I run SharePoint to share pictures with Family and Friends so it has important info in the DB that can't be reproduced.

  • Almost certainly not.

    If (and only if) the database was in full recovery and the log had never been truncated since the last full backup and the database was still listed in SQL and you had that starting full backup, then you could recover.

    My guess, the DB was in simple recovery meaning the log was getting overwritten regularly.

    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
  • The DBs have never had Truncated or anything since it wouldnt let me when I tried, it errored and said SQL2008 basically couldn't do what SQL2005 could do and that it was automatic. So in turn I really never did anything and let SQL2008 do its thing.

  • If you have never taken a backup, the logs would have been truncating automatically. You'd know if they hadn't, the logs would be many times the size of the data file.

    Seriously, if you don't have a backup there's no way to recover. Even if the logs are by some miracle intact, you need to restore the full backup before you can do anything with the log.

    You could buy a copy of Apex SQL Log rescue, see if it can recover anything from the log. It is around $1000 though.

    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

Viewing 4 posts - 1 through 3 (of 3 total)

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