如何打开SQL Server事务日志文件(LDF)?

发布于 2024-12-09 07:38:16 字数 160 浏览 1 评论 0原文

我的意思是打开 LDF 文件并读取/分析它的方法。

现在,我能够提取备份LDF文件,但当数据库工作时,LDF文件似乎是SHARE_DENY_READ。

但是其他的第三方软件比如Lumigent Log Explorer,他们怎么打开这个文件呢?这种软件是直接读取LDF的吗?

I mean the way to open the LDF file and read/analyze it.

Now, I have ability to extract the backup LDF file, but it seems that the LDF file is SHARE_DENY_READ when the database is working.

But the other 3rd-party software like Lumigent Log Explorer,how could they open the file?Does this kind of software read LDF directly?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

杯别 2024-12-16 07:38:16

SQL Server 事务日志格式没有记录,因此不能用于直接从中读取数据。

有一些工具,例如 ApexSQL Log 可以读取事务日志,但这只是因为它们可能花费了大量时间对其格式进行逆向工程。

阅读选项包括:

a) 自行确定格式(不推荐)
b) 给自己找一个第三方工具
c) 使用 fn_dblog 等函数,这些函数也没有记录,但可以为您提供一些详细信息。

SQL Server transaction log format is not documented and therefore can’t be used to read data from it directly.

There are tools such as ApexSQL Log that can read the transaction log but it’s only because they probably spent a ton of time reverse engineering its format.

Options for reading are to:

a) figure the format on your own (not recommended)
b) get yourself a third party tool
c) using functions such as fn_dblog that are also not documented but can give you some details.

披肩女神 2024-12-16 07:38:16

我不确定我是否理解你的问题,但是是的,这些第三方工具直接读取 ldf 文件。

您还可以使用 DBCC LOG 命令,但它没有文档记录,而且输出有点神秘。

I'm not sure I'm understanding your question, but yes these 3rd party tools read the ldf file directly.

You can also use the DBCC LOG command, but it is undocumented and the output is a bit cryptic.

剧终人散尽 2024-12-16 07:38:16

打开 LDF 文件的方法有多种,大多数方法就是这样做 - 打开它。获取任何人类可读的信息并利用它是很困难的,但

要能够读取事务日志以查看操作类型、受影响对象的模式和对象名称、执行操作的时间、名称执行该操作的用户的信息以及更多信息,请查看

请注意,所提供的解决方案不受您是否读取在线事务日志的影响 - 不存在阻止读取过程的锁并分析事务日志

免责声明:我在 ApexSQL 担任产品支持工程师

There are different ways to open an LDF file, and most of them do just that – opens it. It’s tricky to get any human readable information and make a use of it though

To be able to read transaction logs in order to see the operation type, the schema and object name of the object affected, the time when the operation was executed, the name of the user who executed the operation, and more, check out the Open LDF file and view LDF file content online article

Note that the provided solution is not affected by whether you read an online transaction log or not - there are no locks that prevent the process of reading and analyzing the transaction log

Disclaimer: I work as a Product Support Engineer at ApexSQL

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文