通过编程修复SQLite数据库 [英] Programatically Repair SQLite Database

查看:294
本文介绍了通过编程修复SQLite数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有必要尝试从.NET程序修复SQLite数据库,如果数据库文件被损坏。我已经发现了几个网站,例如修复的SQLite 和的常见问题解答其描述,你可以:

So I have a need to try and repair a SQLite database from a .NET program if the database file gets corrupted. I have found several sites such as Fix SQLite and in the FAQ it describes that you can:

根据你的数据库是如何严重损坏,您可以通过使用CLI转储架构和内容保存到一个文件,然后重新恢复一些数据。

Depending how badly your database is corrupted, you may be able to recover some of the data by using the CLI to dump the schema and contents to a file and then recreate.

有谁知道的一种方式在.NET编程修复SQLite数据库?

Does anyone know of a way to repair a SQLite database programatically in .NET?

推荐答案

您俯瞰一个重要的一句话:你可以恢复部分数据,这不是一个修复

You are overlooking one important word: you can 'recover some data', this is not a repair!

如果有一个sitatuation,其中一个损坏的数据库,可以完全修复,而无需用户交互比它不会破坏在首位,这样的修复本来的标准功能的SQLite

If there is a sitatuation where a corrupted database could be repaired perfectly without user-interaction than it would not be corrupted in the first place and such an repair would have been a standard function of SQLite

这篇关于通过编程修复SQLite数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆