logging of DDL in SQL Server and Oracle

  • Hi,

    working with oracle databases i learned that a truncate table statement cannot be rolled back because DDL Statements are not logged.

    with an SQL-Server obviously i can truncate a table and get the data back

    begin transaction

    truncate table myTable

    rollback

    I even can create a table and roll the creation back!

    What do you think about it? Wouldn't this cause that SQL-Server is slower in cases of massdata processing than oracle?

    Maybe there is an option to deactivate this behaviour?

    Tobias

  • The deallocations of pages are logged, not each row, so this is quick.

    Also, keep in mind that a truncate is usually to clear out data. I've not seen it included in a transaction unless there is additional logic.

Viewing 2 posts - 1 through 1 (of 1 total)

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