Dynamic SQL statement gets logged in Transaction log?

  • Hi All,

    We have a database of Size 600 GB.

    And there is a etl job that inserts huge chucks of records every one hour. And also we have transaction log backup every one hour too.

    And the the insert statement was dynamically constructed and executed via sp_executesql

    Is is possible these insert statement gets logged in transaction log. I am confused with that. Actually we have a situation to restore back few hours back log to see some of the data inserted?

    Thank you.

  • The rows being inserted will be logged. The statement itself won't.

    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

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Hi Gail,

    Thanks for the clarification.

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

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