注册 | 登录 忘记密码? 51cto首页 | 博客 | 论坛 | 招聘
热点文章 SQL Server系统数据库恢复
 帮助

如何查看SQL Server的事务日志


2008-04-29 14:07:58
在SQL Server 7.0和SQL Server2000中,可以用下面的命令查看:
DBCC log ( {dbid|dbname}, [, type={0|1|2|3|4}] )
例如:DBCC log (master,0)
    参数:
  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)




    文章评论
 
 

发表评论

昵   称:
验证码:  点击图片可刷新验证码  博客过2级,无需填写验证码
内   容: