transaction log help for beginner | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

transaction log help for beginner

I would like to ask is there an sql command that will tell you how many updates inserts and deletes have been commited to the transaction log? I would also like a way to monitor the daily size of the trans log basically I would like to say the tranaction logs today had so many updates deletes and inserts and than come up with how much space all of that is taking up. I know there are products out there that will let you view the trans log such as apexsql log but I’m not wanting to spend money on such a progam.
In regards to monitoring daily size of the log space, you can run
DBCC SQLPERF (LOGSPACE)
and save the data off somewhere and compare the difference. You can use the following command to view logs, but it isn’t useful/friendly, in my opinion.
DBCC log(master, 2) The part below was taken from:
http://www.mcse.ms/archive83-2004-3-467145.html "DBCC log ( {dbid|dbname}, [, type={0|1|2|3|4}] ) PARAMETERS:
Dbid or dbname – Enter either the dbid or the name of the database in
question. type – is the type of output: 0 – minimum information (operation, context, transaction id)
1 – more information (plus flags, tags, row length)
2 – very detailed information (plus object name, index name, page id, slot
id)
3 – full information about each operation
4 – full information about each operation plus hexadecimal dump of the
current transaction log’s row.
by default type = 0 To view the transaction log for the master database, you can use the
following command: DBCC log (master)"
]]>