September 21, 2011 at 9:40 am
Matt Miller (#4) (9/21/2011)
(: Hakuna Matata 🙂 (9/21/2011)
Gianluca Sartori (9/21/2011)
(: Hakuna Matata 🙂 (9/21/2011)
Can we rollback if we use truncate command??? I dont think we can rollback since truncate command does not generate any logs.If SQL Server was like Oracle you would be right.
Fortunately, it's not.
Very true.. In Oracle truncate does not permit rollback. So I presumed it is the same with SQL Server.
It just doesn't log the individual rows being removed. It logs the PAGES it is removing. (so it's a lot less being logged, but still - it's logged).
And it's worth noting that the engine considers it to be a fully logged operation (it doesn't prevent point-in-time recovery if in bulk-logged recovery model)
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
Viewing post 16 (of 15 total)
You must be logged in to reply to this topic. Login to reply