How to view the log database

In SQL Server, a database of the log is * .ldf files are stored, what I want to see a log of a database, how to operate.
Method 1:

DBCC   LOG ( ' DatabaseName ' , 2 )

 

Method 2:

select   *   From  ::fn_dblog( default , default )

 

Method 3:

用Log Explorer


The DBCC LOG can use the following command to see:  

 

DBCC   log  ( {dbid | dbname},  [ , type={0|1|2|3|4} ]  )

 

Parameters:
Dbid dbname or - any ID or name of a database
type - the type of output:
0 - minimum information (Operation, context, Transaction ID)
. 1 - More information (the flags PLUS, Tags, Row length)
2 - very detailed information (PLUS Object name, index name, the above mentioned id Page, slot the above mentioned id)
3 - all the information for each operation
4 - all the information for each operation plus the transaction hexadecimal information
default type = 0
to view MSATER database the transaction log can use the following command:
the DBCC log (Master)

Reproduced in: https: //www.cnblogs.com/qiangshu/archive/2010/06/23/1763545.html

Guess you like

Origin blog.csdn.net/weixin_34290390/article/details/94687903