TRUNCATE TABLE and ROLLBACK TRAN

  • GilaMonster (2/6/2012)


    Is it bad form, if you create a QotD, to list your own article as a reference?

    If it's a good article? No, not at all. I've done it in the past.

    That being said, I do always prefer an official MS reference. But if there isn't one, a third-party reference that is solid enough (read: based on other MS material, or equipped with enough code samples to prove that the statements are true) will do just fine.

    I don't know your article, but I do know you - and that's enough for me to assume that your article will meet the bar. Easily!


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/

  • GilaMonster (2/6/2012)


    Is it bad form, if you create a QotD, to list your own article as a reference?

    Might not be bad form, but I can just image the list of those who whine and cry "give me my points".

    So then ask some one else to be the author of the QOD or QODs who then can site your article(s) as justification.

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • GilaMonster (2/6/2012)


    Is it bad form, if you create a QotD, to list your own article as a reference?

    It's probably better to find another one just so there's input from two different people but if it's the best reference (that can be found without a quick search) I would say go for it. No sense in wasting time when you have a good, accurate article that you can find quickly.

  • Great question to start a week with. Thanks, Craig!

  • Nice question. Thanks Craig.

  • GilaMonster (2/6/2012)


    Is it bad form, if you create a QotD, to list your own article as a reference?

    Nah - go for it.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Stewart "Arturius" Campbell (2/6/2012)

    Wonder when this was changed?

    Granted I haven't worked in Oracle itself since 7b...

    It was always the case in Oracle 7 and before as well (ie when I last worked with it, around 1996). Which is why I once thought that truncate couldn't be rolled back in MSSQL either.

  • GilaMonster (2/6/2012)


    Is it bad form, if you create a QotD, to list your own article as a reference?

    I wouldn't mind :). Still, an msdn reference, if there is any relevant, would be a good addition.

  • vk-kirov (2/6/2012)


    Hugo Kornelis (2/6/2012)


    And 34% of them are for "you can never rollback a truncate table statement"

    Maybe they are Oracle refugees? :hehe: http://www.sqlservercentral.com/articles/Raw+Materials/71108/

    :w00t: AHHH! I've been discovered! Oh well, I've been at least partially in the SQL Server world since 2000 so I guess I should know better by now.

  • thanks for the question

  • Nice and simple. Thanks.

  • My sincere apologies to those of you who have done counter-myth articles of this nature. I meant to say no OFFICIAL documentation on recovery mode associations, but there are blogs out there that discuss Truncate Rollbacks. Apparently I faux pas'd when I gave it to Steve. Apologies to y'alls fine work.

    Thanks for all the well-wishes. And yes, the distribution is disturbing.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • GilaMonster (2/6/2012)


    Is it bad form, if you create a QotD, to list your own article as a reference?

    I hope not, since I have done this a couple of times. That said, I found two other (non-official, but well-regarded) references and listed them before my own.

  • Thanks to Craig for the question and Paul for the link to Kalen's article.

    It's really good to know that SQL Server will exclusively lock the pages that were truncated until the transaction has ended, so no inconsistent reallocations will occur.

    Also about Oracle: why would they create a restriction for the TRUNCATE TABLE in later versions when in version 7 the command could be rolled back?

    An excellent QoTD.

    Best regards,

    Andre Guerreiro Neto

    Database Analyst
    http://www.softplan.com.br
    MCITPx1/MCTSx2/MCSE/MCSA

  • GilaMonster (2/6/2012)


    Given the distribution of answers, I'm considering a followup question - "does recovery model ever affect the ability to rollback transactions?" because it appears way too many people don't understand what recovery models do.

    Or maybe create MotD (Myth of the Day) 😀

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 15 posts - 31 through 45 (of 58 total)

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