Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Sql Server Transaction Logs

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-08-08 : 08:17:07
Niyati writes "How do I read the Transaction Log of Sql Server?"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-08-08 : 08:18:24
Log Explorer:

http://www.lumigent.com/

What exactly are you looking for in the log?
Go to Top of Page

shsmonteiro
Constraint Violating Yak Guru

290 Posts

Posted - 2003-08-10 : 21:35:21
Merchandising, Rob?

What about dbcc log?

Sérgio Monteiro
Trust in no Oracle
Go to Top of Page

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2003-08-11 : 01:21:41
quote:

What about dbcc log?



here is how it works (http://www.databasejournal.com/features/mssql/article.php/1442251#part_2_8)

This command is used to view the transactional log for the specified database.

SYNTAX:
DBCC log ( {dbid|dbname}, [, type={-1|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, description)

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.

-1 - full information about each operation plus hexadecimal dump of the current transaction log's row, plus Checkpoint Begin, DB Version, Max XDESID

by default type = 0


To view the transaction log for the master database, you can run the following command:

DBCC log (master)



-ec

Go to Top of Page

hadoft
Starting Member

20 Posts

Posted - 2003-08-11 : 04:19:01
hi
what can i make use of reading the Transaction Log for a database?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-08-11 : 12:38:35
Ummm, it has the transactions that occurred on the database.

Tara
Go to Top of Page

shsmonteiro
Constraint Violating Yak Guru

290 Posts

Posted - 2003-08-11 : 18:04:55
This command is useful to manually recovery stupidities.

Sérgio Monteiro
Trust in no Oracle
Go to Top of Page

shsmonteiro
Constraint Violating Yak Guru

290 Posts

Posted - 2003-08-12 : 22:47:37
Eyechad, the article from Alexander Chigrik is greate but a little outdated. For example, DBCC LOG for SQL 2k has a number of other parameters not mentioned in it:

DBCC log ([dbid[,{0|1|2|3|4}[,['lsn','[0x]x:y:z']|['numrecs',num]|['xdesid','x:y']|['extent','x:y']|['pageid','x:y']|['objid',{x,'y'}]|['logrecs',{'lop'|op}...]|['output',x,['filename','x']]...]]])

regards,


Sérgio Monteiro
Trust in no Oracle
Go to Top of Page

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2003-08-18 : 00:56:09
quote:
Originally posted by shsmonteiro

Eyechad, the article from Alexander Chigrik is greate but a little outdated. For example, DBCC LOG for SQL 2k has a number of other parameters not mentioned in it:

DBCC log ([dbid[,{0|1|2|3|4}[,['lsn','[0x]x:y:z']|['numrecs',num]|['xdesid','x:y']|['extent','x:y']|['pageid','x:y']|['objid',{x,'y'}]|['logrecs',{'lop'|op}...]|['output',x,['filename','x']]...]]])


It's fun finding documentation for the undocumented. Thanks for the info Sergio.


-ec
Go to Top of Page
   

- Advertisement -