SQLITE 文件已加密或不是数据库 [英] SQLITE file is encrypted or is not a database

查看:46
本文介绍了SQLITE 文件已加密或不是数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个大问题...我正在使用 SQLite 开发桌面应用程序,但在复制/粘贴过程中,我失去了电源,过程终止,因此基础丢失.但是,我找到了一种方法来恢复它,但 base 是加密的.当我尝试使用 conn.Open(); 打开连接时,出现此错误.如果我尝试使用 DB Browser for SQLite 打开它,它会询问我 SQLCipher 加密密码,因此我认为数据丢失了..

I have a huge problem... I am developing desktop app with SQLite but during copy/paste process I lost a power and process was terminated so base was lost. However, I found a way to recover it but base is encrypted. When I try to open connection using conn.Open(); I get this error. If I try to open it with DB Browser for SQLite it asks me a SQLCipher encryption password so it seams to me that data is lost..

有默认密码吗?为什么会发生这种情况以及如何防止它再次发生?我能做什么?

Is there any default password ? Why did this happen and how to prevent it from happening again ? What can I do ?

提前致谢.

推荐答案

好吧,终于找到了一个有效的解决方案,所以如果有人和我一样遇到同样的问题,请发布答案..

Ok, finally found a solution that works so posting the answer if anybody will have same trouble as I did..

首先,使用好的恢复软件.为了修复数据库,我找到了 3 个无需备份即可工作的解决方案:

First of all, use good recover software. For repairing the database I found 3 solutions that work without backup :

  1. 使用 DB 浏览器打开损坏的数据库并将数据库导出到 SQL.随意命名.然后,创建新数据库并从 SQL 导入数据库.
  2. 有修复损坏数据库的软件.下载一个并使用它来修复数据库.
  3. 从 sqlite.org 下载sqlite3"并在命令行中导航到sqlite3"解压缩的文件夹.然后尝试使用 .dump 转储整个数据库,并使用这些命令创建一个新数据库:

  1. Open corrupted database using DB Browser an Export Database to SQL. Name it however you want. Then, create new database and import database from SQL.
  2. There is software that repairs corrupted databases. Download one and use it to repair the database.
  3. Download "sqlite3" from sqlite.org and in command line navigate to folder where "sqlite3" is unzipped. Then try to dump the entire database with .dump, and use those commands to create a new database:

sqlite3 corrupt_table_name.sqlite ".dump" | sqlite3 new.sqlite

这篇关于SQLITE 文件已加密或不是数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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