SQL Server 檢視資料庫日誌

itscrambler發表於2012-08-08

DBCC log ( {dbid|dbname}, [, type={0|1|2|3|4}] )
  引數:
  Dbid or dbname - 任一資料庫的ID或名字
  type - 輸出結果的型別:
  0 - 最少資訊(operation, context, transaction id)
  1 - 更多資訊(plus flags, tags, row length)
  2 - 非常詳細的資訊(plus object name, index name,page id, slot id)
  3 - 每種操作的全部資訊
  4 - 每種操作的全部資訊加上該事務的16進位制資訊
  預設 type = 0
  要檢視MSATER資料庫的事務日誌可以用以下命令:
DBCC log (master)

[@more@]

DBCC log (tsp2)

000003df:00000010:0078 LOP_BEGIN_CKPT LCX_NULL 0000:00000000 BINARY, 2 Bytes 96 96 000003de:00000160:0001 BINARY, 2 Bytes (null) (null) (null) (null) (null) (null) (null) (null) (null) 2012/06/06 11:23:46:890 611 0000:00124219 (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null)
000003df:00000041:0001 LOP_END_CKPT LCX_NULL 0000:00000000 BINARY, 2 Bytes 136 136 000003df:00000010:0078 BINARY, 2 Bytes (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) 2012/06/06 11:23:46:923 611 000003df:00000010:0078 36 00000000:00000000:0000 00000000:00000000:0000 00000000:00000000:0000 00000000:00000000:0000 (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null)
000003df:00000042:0001 LOP_BEGIN_XACT LCX_NULL 0000:0012421a BINARY, 2 Bytes 48 84 00000000:00000000:0000 BINARY, 2 Bytes (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) 0 -1 131 BINARY, 4 Bytes 2012/06/06 11:23:49:720 INSERT BINARY, 16 Bytes (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) INSERT;0x6efd1470e725d14eae6305cf7a938f78 (null) (null) (null) (null) (null) (null) (null) (null) (null) (null)

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26273052/viewspace-1059114/,如需轉載,請註明出處,否則將追究法律責任。

相關文章