利用fn_dblog函数可以查看用户所操作的所有MDL操作,但是此记录在表里是以16进制值来呈现的,请问大神们怎么将它转换成明文。SQL Serverfn_dblog解析
解决方案 »
- 求代码优化...下述代码执行时间超长.
- 数据库模型图作用
- 如何使用PIVOT ? 求一交叉表的SQL语句!!(SQL SERVER 2005)
- 求一SQL-------------解决立马给分,谢谢~~~~`
- 有个字段 AAA 存放的是身份证号码。
- 视图和表的同步,有人会吗?
- 怎样可以自动删除过时的记录?
- 一个nvarchar字段,我该怎么加这些日文或韩文"ボーイフレンド特殊字符?
- 关于bcp命令,有的机器可以执行,有的机器不可以
- 我要把excl文件中的两条记录用sel server 7.0导入到sql table 中,如何作?
- 求助 restore with move问题
- sql连接字符串无法使用 hosts文件中映射ip的别名
--自己解析:http://wenku.baidu.com/view/b9a759bfc77da26925c5b065.html
说明地址:http://raresql.com/2011/10/22/how-to-recover-deleted-data-from-sql-sever/
这段就是分析逻辑
[Fixed Length Data] = Substring (RowLog content 0, Status Bit A+ Status Bit B + 1,2 bytes)
[Total No of Columns]= Substring (RowLog content 0, [Fixed Length Data] + 1,2 bytes)
[Null Bitmap length] = Ceiling ([Total No of Columns]/8.0)
[Null Bytes]= Substring (RowLog content 0, Status Bit A+ Status Bit B + [Fixed Length Data] +1, [Null Bitmap length] )
Total no of variable columns = Substring (RowLog content 0, Status Bit A+ Status Bit B + [Fixed Length Data] +1, [Null Bitmap length] + 2 )
Column Offset Array= Substring (RowLog content 0, Status Bit A+ Status Bit B + [Fixed Length Data] +1, [Null Bitmap length] + 2 , Total no of variable columns*2 )
Variable Column Start = Status Bit A+ Status Bit B + [Fixed Length Data] + [Null Bitmap length] + 2+( Total no of variable columns*2)