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)清除所有的测试数据,以保 ...
随机推荐
- mongo远程登录
1. 进入数据库: use admin db.addUser("foo","foo"); ps:高版本用db.createUser创建. 2. 改配置 如/et ...
- python作业之修改用户配置文件
用户的配置文件如下 backend oldboy school school1 age 21 weight 210 qq 550176565 iphone 139987676backend oldgi ...
- win下php的memcached的安装与使用
1.memcache的php扩展与memcached服务器的区别? php要操作memcached就必须要安装memcache的扩展, 在http://windows.php.net/download ...
- ueditor使用注意
问题1:后端配置项没有正常加载,上传插件不能正常使用! 我用的是开发版,1.4.3.3 .Net版 网上查了很多,后来发现只是配置的问题而已. 1.在根目录下:config.json 其中有Img上传 ...
- vue1.0学习
vue 一片html代码配合上json,在new出来vue实例 Demo:1 数据双向绑定(v-model="message",{{message}}) <div id=&q ...
- 关于UI设计的一些工作了解
关于UI设计相信大家在刚接触UI的时候都不太了解,我来说说我在一段学习时间后的了解. UI从工作内容上来说分为3大类,即研究工具,研究人与界面的关系,研究人与之相应. UI设计师的职能一个是图形设 ...
- laravel配置路由出现404
nginx配置上加一句话 location / { #try_files $uri $uri/ =; try_files $uri $uri/ /index.php?$query_string; }
- Plugin 'Scala' is incompatible with this.installation
==问题=== 手动安装IDEA的Scala插件,报这个错误. ===原因=== IDEA的版本与Scala插件的版本不兼容. ===解决=== 1.查看一下IDEA的版本 2.下载对应版本的Scal ...
- oracle常用函数速记
1.截断中文字符串 CREATE OR REPLACE function cn_cutstr(v_str varchar2,v_len number) return varchar2 IS v_i n ...
- Spring Boot之初始化项目
最简单的从Spring官网下载 :地址 https://start.spring.io/ 下拉选择需要的Spring Boot版本 修改Group和Artifact 直接点击Generate Pro ...