Transaction Log

  • How do u recover data from transaction log files? Is the .ldf file and sql server log file under management the same thing?

    Thanks

  • Just what exactly are you trying to recover? If you have periodic transactional backups you can restore your data to a specifc time.

    Remember
    Without Change something sleeps inside of us that seldom awakens, the sleeper must awaken!!

  • Typically you restore a full back with norecovery or standby and then restore transaction logs until the point you need and then restore with recovery so you can read from the database.

    There are third-party tools out there that allow you to directly read the log file, but that isn't usually recommended.

    What exactly do you need to do?

  • That means therez isn't possibility of accessing log files without the need of third party tools. What are log files in objectExplorer->Management->Sgl Server log file. Is this the same files that are inside .ldf?

    thanks.

  • No my friend that is the SQL server log... think of it as the repository where you can see jobs status/deadlocks/login failures or system issues you have. It will not displace any .ldf information.

    Remember
    Without Change something sleeps inside of us that seldom awakens, the sleeper must awaken!!

  • nirnaykhatri (1/12/2012)


    That means therez isn't possibility of accessing log files without the need of third party tools. What are log files in objectExplorer->Management->Sgl Server log file. Is this the same files that are inside .ldf?

    thanks.

    No. Not same.

    SQL Server log is for the SQL Server instance. Similarly there is a SQL Server Agent (Error) Log.

    Whereas every database as at least one .ldf file. This is Transaction Log file.

  • nirnaykhatri (1/12/2012)


    That means therez isn't possibility of accessing log files without the need of third party tools.

    There's a couple of undocumented commands that let you read the transaction logs, but the logs were never intended to be human-readable. The output from those commands are mostly undocumented and very hard to understand. The logs are transaction logs for database recovery, not audit logs.

    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
  • Let's go back to your original question.

    What happened? Why do you need to read data from your log file?

    And do you just want to read it or are you trying to recover something that got deleted / updated incorrectly?

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • nirnaykhatri (1/12/2012)


    How do u recover data from transaction log files? Is the .ldf file and sql server log file under management the same thing?

    Thanks

    To recover the data from transaction log files you need to take the transaction log backups, so that you can restore them in case of any data loss event.

    If you want to just read the data fn_dblog() can do that, but I don't think it will of much use for you.

    Theres a (i think free) tool available from red gate i think to read the log.

    The log that is present in management studio, is known as SQL Server Error Log, something like windows eventviewer.

    Transaction log file (.ldf) is to support the database recovery & to support the transactions like rolling back a transaction.


    Sujeet Singh

  • Divine Flame (1/13/2012)


    Theres a (i think free) tool available from red gate i think to read the log.

    For SQL 2000.

    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 10 posts - 1 through 9 (of 9 total)

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