Importance of log file

  • What all statements are logged in transaction log file in sql server.

  • There is an excellent 'Stairways' series here, which explains the Log File in detail:

    http://www.sqlservercentral.com/articles/Stairway+Series/73775/

  • Not totally sure what you are asking here, but the actual SQL statements are not written to the log file.

    What is written to the log file is copies of the data changed by those statements, in sufficient detail to allow it to be undone - rolled back, or redone in a recovery situation. The precise level that gets logged varies according to recovery models and what statements we are talking about, but logically you can think of it as copies of the data affected before the update, and after the update.

    Does that help?

    Mike

  • Just want to know whether all ddl(create,alter,drop) and dcl (grant,deny,revoke)stsements are also logged in log file apart from dml(select,insert,update,delete)ststements?

    Thanks in advance

  • Yes, everything that changes anything is logged, and therefore if inside a transation it can be rolled back. Including create table, drop table truncate etc .

    Mike

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

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