SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Does transaction log contain data or commands
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ranvir_2k
Posting Yak Master

United Kingdom
173 Posts

Posted - 07/25/2014 :  10:18:37  Show Profile  Reply with Quote
Hi all,

What does the transaction log actually contain?

Is it each individual data row that is inserted/modified?

Or the command that modified the data?

I'm guessing it's the former

Thanks

MichaelJSQL
Posting Yak Master

172 Posts

Posted - 07/25/2014 :  10:34:19  Show Profile  Reply with Quote
It contains information about everything done in your db for rollback and roll forward purposes

-- take a look
SELECT *
FROM fn_dblog (null, null);

-- some good links
http://www.sqlskills.com/blogs/paul/understanding-data-vs-log-usage-for-spills-in-tempdb/
http://rusanu.com/2014/03/10/how-to-read-and-interpret-the-sql-server-log/
http://raresql.com/2013/04/15/sql-server-undocumented-function-fn_dblog/
http://www.sqlskills.com/blogs/jonathan/an-xevent-a-day-22-of-31-the-future-fn_dblog-no-more-tracking-transaction-log-activity-in-denali/
Go to Top of Page

jackv
Flowing Fount of Yak Knowledge

United Kingdom
2075 Posts

Posted - 07/26/2014 :  03:04:39  Show Profile  Visit jackv's Homepage  Reply with Quote
According to SQL Server BOL;supplied the SQL Server Books Online :
1) The start and end of each transaction
2) Every data modification (insert, update, or delete). This includes changes by system stored procedures or data definition language (DDL) statements to any table, including system tables.
3) Every extent and page allocation or deallocation.
4) Creating or dropping a table or index
5) Rollback operations
6) Transaction SID

Also , check:
http://www.sqlserver-dba.com/2012/12/sql-server-inside-the-sql-transaction-logs-with-fn_dblog-and-current-transaction_id.html


Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000