DBCC--LOG
DBCC LOG
To retrieve the transaction log for a given database.
对应日志文件较大的数据库,慎用该命令
Uasge:
DBCC LOG(<dbid|dbname>,<formatid>)
formatid:
0: Return only the minimum of information for each operation -- the operation, its context and the transaction ID. (Default)
1: As 0, but also retrieve any flags and the log record length.
2: As 1, but also retrieve the object name, index name, page ID and slot ID.
3: Full informational dump of each operation.
4: As 3 but includes a hex dump of the current transaction log row.
--==============================================================================
dbcc log [ (@dbid, @objid, @pagenum, @rownum, @records, @type [, @printopt]) ]
dbcc log (5, 0, 0, 0, -1, 0, 1) // Show the last begin transaction record in the log
Parameters:
@dbid Database ID
@objid Object ID
A negative value indicates that @pagenum & @rownum represent a row in the log to use as a starting point in the scan of the log.
A value of zero indicates that log records for changes to @pagenum will be included in the commands output.
A positive value followed by a non-zero value for @pagenum indicates that @pagenum and @rownum represent a transaction ID. Log records for that transaction will be included in the output.
A positive value followed by zero values for @pagenum and @rownum indicates an object ID. Log records for changes to that object will be included in the output.
@pagenum page number
@rownum row number in the log
Together with @pagenum, this is either a starting point in a scan of the log or a transaction id.
@records number of records to examine. If positive, the first
@type
@printopt
--==============================================================================
使用fn_dblog或sys.fn_dump_dblog来查看日志
SELECT * FROM sys.fn_dblog(@StartingLSN, @EndingLSN)
@StartingLSN和@EndingLSN可以为null
DBCC--LOG的更多相关文章
- DBCC常用命令小汇
DBCC是SQL Server提供的一组控制台命令,功能很强大,掌握一些必要的语句,对操作数据库有不少帮助,所以决定整理一下,发现已有不少类似的整理,减少了不少工作,归类如下: 一.DBCC 帮助类命 ...
- sqlserver log
DBCC LOGINFODBCC log('QSSys', TYPE=2)goselect * from sys.fn_dblog(null,null)select [Dirty Pages],[Mi ...
- DBCC用法汇总
本文摘自http://www.cnblogs.com/lilycnblogs/archive/2011/03/31/2001372.html 留作查阅 DBCC是SQL Server提供的一组控制台命 ...
- DBCC命令
DBCC SQLMGRSTATS 用于产生3个不同的值,这些值用在你想查看高速缓存在ad-hoc和预编译的TSQL语句中是如何工作的 Memory Used(8K Pages):若内存页的数量非常大, ...
- List Available DBCC Commands
DBCC Commands or Database Consistency Checker commands have been with SQL Server from its early ages ...
- DBCC - Undocumented commands
These commands may affect system performance and/or force table-level locks.There is no guarantee th ...
- DBCC维护语句语法
一.DBCC维护语句:对数据库.索引或文件组进行维护的任务--1.DBCC CLEANTABLE,回收删除的可变长度列和文本列的空间 DBCC CLEANTABLE ( { 'database_na ...
- SQL Server 2000 ——DBCC命令
http://blog.163.com/ruifeng_00/blog/static/6904584200971291923462/ 一.定义 微软当初从SYBASE将DBCC是作为数据库一致性检 ...
- 几个未公开的 DBCC 命令
http://blog.csdn.net/CathySun118/article/category/538610 https://ask.hellobi.com/blog/lyhabc/1612 1. ...
- SQLSERVER DBCC命令大全
DBCC DROPCLEANBUFFERS:从缓冲池中删除所有缓存,清除缓冲区 在进行测试时,使用这个命令可以从SQLSERVER的数据缓存data cache(buffer)清除所有的测试数据,以保 ...
随机推荐
- OpenCV(图像处理)—访问像素的三种方法
方法一:用指针访问像素 #include <opencv2/opencv.hpp> #include <opencv2/core/core.hpp> #include < ...
- 早停法(Early Stopping)
一.早停法简介(Early Stopping)当我们训练深度学习神经网络的时候通常希望能获得最好的泛化性能(generalization performance,即可以很好地拟合数据).但是所有的标准 ...
- CloseableHttpClient(二)
package com.cmy.httpClient; import java.io.IOException; import org.apache.http.HttpEntity; import or ...
- javascript的数据检测总结
目录 javaScript的数据检测 1.typeof 2.instanceof 3.constructor 4.Object.prototype.toString.call()--------- 一 ...
- struts2框架之OGNL表达式概述(在代码中使用OGNL表达式)
1. OGNL是Object Graphic Navigation Language(对象图导航语言)的缩写 * 所谓对象图,即以任意一个对象为根,通过OGNL可以访问与这个对象关联的其它对象 * 通 ...
- Android 获取ROOT权限原理解析
一. 概述 本文介绍了android中获取root权限的方法以及原理,让大家对android玩家中常说的“越狱”有一个更深层次的认识. 二. Root的介绍 1. Root 的目的 可以让 ...
- 765A Neverending competitions
A. Neverending competitions time limit per test 2 seconds memory limit per test 512 megabytes input ...
- laravel加载视图
1.控制器 2.路由 3.视图
- [BAT]cmd命令之 cd /d %~dp0
cd /d %~dp0是什么意思啊?批处理文件中的一条语句意思是 更改当前目录为批处理本身的目录 有些晕吧?不急,我举例 比如你有个批处理a.bat在D:\qq文件夹下 a.bat内容为 cd /d ...
- 数据库链接 mybatis spring data jpa 两种方式
jdbc mybatis spring data jpa dao service webservice jaxrs jaxws springmvc w ...