gpt4 book ai didi

Sqlite 数据库浏览器崩溃 - 如何使用日志文件恢复数据库

转载 作者:IT王子 更新时间:2023-10-29 06:26:48 24 4
gpt4 key购买 nike

我使用“SQlite 数据库浏览器”程序处理我的 sqlite 数据库。程序崩溃了,我丢失了更改。但是 db-journal 文件仍然存在。如何使用日志文件恢复数据库?当我使用 SQLite 数据库浏览器打开数据库时,打开的是旧数据库。

我能做什么?

谢谢:-)

最佳答案

除非您启用预写日志记录,否则恐怕您的更改可能会丢失。 SQLite 中默认的日志系统以与您预期相反的方式工作。

来自文档:

The traditional rollback journal works by writing a copy of the original unchanged database content into a separate rollback journal file and then writing changes directly into the database file. In the event of a crash or ROLLBACK, the original content contained in the rollback journal is played back into the database file to revert the database file to its original state.

参见:

沃尔玛:https://sqlite.org/wal.html

文件格式,包括期刊: https://sqlite.org/fileformat.html

关于Sqlite 数据库浏览器崩溃 - 如何使用日志文件恢复数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7858912/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com