locked
transction log RRS feed

  • Question

  • how does insertion, deletion and update take place in sql server? does it go from transction log to the database

    or directly to the database itself . is the purpose of transction log is only for back up and recovery?

    Friday, December 3, 2010 8:29 PM

Answers

  • Hi Betremussie,

     

      As  you told, the data won't go directly to the data files (.mdf) ...first it will be placed in the log file(.ldf) .. If the user commits the data then the data will be pushed to data file ... and if the user rollbacks then the data won't be pushed to the data file ... and the above given msdn link, will give complete info ...

     


    -- Reddy Balaji C. ##Mark as answer if it solves the issue
    • Marked as answer by Betremussie Saturday, December 4, 2010 7:47 PM
    Saturday, December 4, 2010 4:40 PM

All replies

  • This is a good article to start with.


    Pradeep Adiga
    Blog: sqldbadiaries.com

    Recent posts on my blog
    Saturday, December 4, 2010 5:25 AM
  • Hi Betremussie,

     

      As  you told, the data won't go directly to the data files (.mdf) ...first it will be placed in the log file(.ldf) .. If the user commits the data then the data will be pushed to data file ... and if the user rollbacks then the data won't be pushed to the data file ... and the above given msdn link, will give complete info ...

     


    -- Reddy Balaji C. ##Mark as answer if it solves the issue
    • Marked as answer by Betremussie Saturday, December 4, 2010 7:47 PM
    Saturday, December 4, 2010 4:40 PM
  • thanks

     

    Saturday, December 11, 2010 1:18 AM
  • data can go to mdf if a checkpoint happens even if the transaction is not committed.

    go through the same link and what will happen during an UNDO phase during recovery.


    Please mark the post as answered to help others to choose the best. chandra sekhar pathivada | www.calsql.com (SQL Server Community Website)
    Monday, December 13, 2010 7:52 AM