Latching in SQL

  • Hi Guys.....We can see there is locking mechanism in SQL Server , Eventhough why do we need a Latch....Please give me some clarification on this. Thanks

  • Not sure what question does in the Security forum, since neither locks nor latches has anything to do with security.

    Latches are short-term locks that SQL Server takes for physical operations like reading a page from disk. They are released before the transaction is committed. Locks are always held to the end of the transaction.

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

  • Basically a lock keeps someone from changing the data while you're accessing it, and a latch keeps someone from changing the col itself while you're accessing it.

    So it keeps someone from changing the data type or the col name... stuff like that.

    Watch my free SQL Server Tutorials at:
    http://MidnightDBA.com
    Blog Author of:
    DBA Rant – http://www.MidnightDBA.com/DBARant

    Minion Maintenance is FREE:

  • to be clear, latches occur on physical disk pages and inmemory pages

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

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

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