# Data Base Problem

**URL:** <https://forums.ankiweb.net/t/data-base-problem/12569>\
**Category:** Help\
**Created:** [August 23, 2021, 10:35am UTC](https://forums.ankiweb.net/t/data-base-problem/12569 "2021-08-23T10:35:56Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![nir1a](https://avatars.discourse-cdn.com/v4/letter/n/43a26b/32.png) [@nir1a](https://forums.ankiweb.net/u/nir1a)\
**Post date:** [August 23, 2021, 10:35am UTC](https://forums.ankiweb.net/t/data-base-problem/12569/1 "2021-08-23T10:35:56Z")

</div>

I am getting this error, I need help. Thanks.

Error  
An error occurred. Please use Tools \> Check Database to see if that fixes the problem.  
If problems persist, please report the problem on our support site. Please copy and paste the information below into your report.  
Anki 2.1.46 (94913ec2) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2  
Platform: Windows 10  
Flags: frz=True ao=False sv=2  
Add-ons, last update check: 2021-08-23 13:33:27

Traceback (most recent call last):  
File “aqt\main.py”, line 523, in loadCollection  
File “aqt\main.py”, line 672, in moveToState  
File “aqt\main.py”, line 679, in \_deckBrowserState  
File “aqt\deckbrowser.py”, line 68, in show  
File “aqt\deckbrowser.py”, line 143, in \_renderPage  
File “aqt\deckbrowser.py”, line 150, in \_\_renderPage  
File “aqt\deckbrowser.py”, line 173, in _renderStats  
File “anki\collection.py”, line 826, in studied\_today  
File “anki\_backend\generated.py”, line 61, in studied\_today  
File "anki\_backend\_init_.py", line 131, in \_run\_command  
anki.errors.DBError: DbError { info: “SqliteFailure(Error { code: DatabaseCorrupt, extended\_code: 11 }, Some(“database disk image is malformed”))”, kind: Other }

---

<div class="post-metadata">

**Author:** ![01101](https://avatars.discourse-cdn.com/v4/letter/0/f9ae1b/32.png) [@01101](https://forums.ankiweb.net/u/01101)\
**Post date:** [August 23, 2021, 3:40pm UTC](https://forums.ankiweb.net/t/data-base-problem/12569/2 "2021-08-23T15:40:30Z")

</div>

Have you already tried to “Check Database” ?

---

<div class="post-metadata">

**Author:** ![nir1a](https://avatars.discourse-cdn.com/v4/letter/n/43a26b/32.png) [@nir1a](https://forums.ankiweb.net/u/nir1a)\
**Post date:** [August 23, 2021, 4:49pm UTC](https://forums.ankiweb.net/t/data-base-problem/12569/3 "2021-08-23T16:49:40Z")

</div>

I have tried it but still I get this error.

---

<div class="post-metadata">

**Author:** ![01101](https://avatars.discourse-cdn.com/v4/letter/0/f9ae1b/32.png) [@01101](https://forums.ankiweb.net/u/01101)\
**Post date:** [August 23, 2021, 4:57pm UTC](https://forums.ankiweb.net/t/data-base-problem/12569/4 "2021-08-23T16:57:48Z")

</div>

See if it solves your problem:

[https://docs.ankiweb.net/files.html?highlight=recover#corrupt-collections](https://docs.ankiweb.net/files.html?highlight=recover#corrupt-collections)

---

<div class="post-metadata">

**Author:** ![nir1a](https://avatars.discourse-cdn.com/v4/letter/n/43a26b/32.png) [@nir1a](https://forums.ankiweb.net/u/nir1a)\
**Post date:** [August 24, 2021, 8:10am UTC](https://forums.ankiweb.net/t/data-base-problem/12569/5 "2021-08-24T08:10:56Z")

</div>

I can not download that file [http://www.sqlite.org/sqlite-3\_6\_23.zip](http://www.sqlite.org/sqlite-3_6_23.zip). Clicking on it but it is not starting.

---

<div class="post-metadata">

**Author:** ![abdo](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/abdo/32/654_2.png) [@abdo](https://forums.ankiweb.net/u/abdo)\
**Post date:** [August 24, 2021, 12:47pm UTC](https://forums.ankiweb.net/t/data-base-problem/12569/6 "2021-08-24T12:47:21Z")

</div>

You should be prompted to download the file somewhere. Doesn’t that work? Maybe try with a different web browser.

After downloading it, you have to run it from the command line as written in the manual:

> Copy the `sqlite3.exe` program and your deck to your desktop. Then go to **Start\>Run** and type in `cmd.exe` .

---

<div class="post-metadata">

**Author:** ![nir1a](https://avatars.discourse-cdn.com/v4/letter/n/43a26b/32.png) [@nir1a](https://forums.ankiweb.net/u/nir1a)\
**Post date:** [August 24, 2021, 3:54pm UTC](https://forums.ankiweb.net/t/data-base-problem/12569/7 "2021-08-24T15:54:09Z")

</div>

It is not working… Can you download the file and upload it to any site so that I may download it from there. Please.

---

<div class="post-metadata">

**Author:** ![cj123](https://avatars.discourse-cdn.com/v4/letter/c/b2d939/32.png) [@cj123](https://forums.ankiweb.net/u/cj123)\
**Post date:** [August 24, 2021, 5:26pm UTC](https://forums.ankiweb.net/t/data-base-problem/12569/8 "2021-08-24T17:26:54Z")

</div>

Hast du die Datei entzipt?

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [August 25, 2021, 12:54am UTC](https://forums.ankiweb.net/t/data-base-problem/12569/9 "2021-08-25T00:54:45Z")

</div>

Did you check all of your backups? That command should only be used as a last resort, and is not guaranteed to work.

---

<div class="post-metadata">

**Author:** ![nir1a](https://avatars.discourse-cdn.com/v4/letter/n/43a26b/32.png) [@nir1a](https://forums.ankiweb.net/u/nir1a)\
**Post date:** [August 25, 2021, 9:54am UTC](https://forums.ankiweb.net/t/data-base-problem/12569/10 "2021-08-25T09:54:15Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/2X/d/df1524d4ff5b549ada7895e1de70d5a5dde1f950.png) As a first solution they offered(Switch the profile) I did it but then this message occured. I don’t know what to do. I have to study my decks on the internet and it’s getting boring without add-ons.

---

<div class="post-metadata">

**Author:** ![nir1a](https://avatars.discourse-cdn.com/v4/letter/n/43a26b/32.png) [@nir1a](https://forums.ankiweb.net/u/nir1a)\
**Post date:** [August 25, 2021, 9:55am UTC](https://forums.ankiweb.net/t/data-base-problem/12569/11 "2021-08-25T09:55:23Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/2X/6/69ecec61ffbde4e1e855113913f8f0b811cf698f.png)  
And after that message this occurs.This backing up process never ends.

---

<div class="post-metadata">

**Author:** ![01101](https://avatars.discourse-cdn.com/v4/letter/0/f9ae1b/32.png) [@01101](https://forums.ankiweb.net/u/01101)\
**Post date:** [August 25, 2021, 3:02pm UTC](https://forums.ankiweb.net/t/data-base-problem/12569/12 "2021-08-25T15:02:32Z")

</div>

If your collection was saved on AnkiWeb, you could force changes in one direction and download it from there, overwriting your corrupted one. You may lose your images or audio if the option “Synchronize audio and images too” on the preferences wasn’t checked the last time you synced successfully.  
Is that right @dae ?

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [August 26, 2021, 12:35am UTC](https://forums.ankiweb.net/t/data-base-problem/12569/13 "2021-08-26T00:35:47Z")

</div>

If you open the Switch Profile screen, create a new profile, and open it, does it open correctly? If so, you should be able to either import a backup into it (one that is old enough that it was created before the problem started), or synchronize your decks from AnkiWeb as @01101 suggested.

---

<div class="post-metadata">

**Author:** ![nir1a](https://avatars.discourse-cdn.com/v4/letter/n/43a26b/32.png) [@nir1a](https://forums.ankiweb.net/u/nir1a)\
**Post date:** [August 28, 2021, 10:06am UTC](https://forums.ankiweb.net/t/data-base-problem/12569/14 "2021-08-28T10:06:15Z")

</div>

when I click to switch profile it says that my files are corrupted. Still hasn’t changed a thing.

---

<div class="post-metadata">

**Author:** ![nir1a](https://avatars.discourse-cdn.com/v4/letter/n/43a26b/32.png) [@nir1a](https://forums.ankiweb.net/u/nir1a)\
**Post date:** [August 28, 2021, 10:31am UTC](https://forums.ankiweb.net/t/data-base-problem/12569/15 "2021-08-28T10:31:47Z")

</div>

Hello guys, I solved the problem myself by downloading the old version. The new version is problematic with me. Idk why. If you have the same problem you can download the old version that might help you. Thanks for your comments.

---

<div class="post-metadata">

**Author:** ![lightmotive](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/lightmotive/32/12674_2.png) [@lightmotive](https://forums.ankiweb.net/u/lightmotive)\
**Post date:** [May 11, 2022, 10:49pm UTC](https://forums.ankiweb.net/t/data-base-problem/12569/16 "2022-05-11T22:49:19Z")

</div>

I experienced this problem, as well–I wasn’t able to use the suggested Switch Profile option suggested above because of the error _nir1a_ explained with a screenshot in Post #11 above: after clicking **Switch Profile** , Anki displays the error message “Your collection file appears to be corrupt. …” and then displays a “Backing Up…” progress popup that never ends. At that point, Anki is frozen.

I think the corruption occurred because I was backing up the Anki2 folder using Google Drive, which I just learned is an unsupported practice that’s know to cause issues. I was using my laptop offline a lot, and there may have been some sudden disconnections, which would affect both Anki and Google Drive sync.

Here’s how I solved it without having to revert to an older Anki version. Note: I had automatic backups enabled, so no local data was lost, but even if you don’t have a local backup, this process will also enable you to “Switch Profile” and sync from the web:

1. Close Anki (Force Quit/End Task if necessary).
2. **Rename the profile folder** in the _Anki2_ folder (find that by reading the Anki manual: _Managing Files/File Locations_) by appending “\_OLD” ( **don’t delete; it contains automatic backups and media files**. FYI, the default profile name is _User 1_.
3. Open Anki. Dismiss prompts about empty collections.
4. Restore a backup that you would find in the _backups_ folder in the “\_OLD” profile folder you just renamed, or restore from another _.colpkg_ file, or sync all changes from AnkiWeb to the new profile (please research how to do that if it’s your only option–it’s beyond this post’s scope).

I hope that helps!

---

<div class="post-metadata">

**Author:** ![Chandu](https://avatars.discourse-cdn.com/v4/letter/c/e9a140/32.png) [@Chandu](https://forums.ankiweb.net/u/Chandu)\
**Post date:** [July 24, 2022, 2:52am UTC](https://forums.ankiweb.net/t/data-base-problem/12569/17 "2022-07-24T02:52:22Z")

</div>

I got my cards back…Thanks a lot,for your suggestion…

---

<div class="post-metadata">

**Author:** ![owat19](https://avatars.discourse-cdn.com/v4/letter/o/839c29/32.png) [@owat19](https://forums.ankiweb.net/u/owat19)\
**Post date:** [August 8, 2022, 7:22pm UTC](https://forums.ankiweb.net/t/data-base-problem/12569/18 "2022-08-08T19:22:07Z")

</div>

this is EXACTLY what I was struggling with. Just fixed my problem perfectly! Thank you!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [May 1, 2023, 4:07am UTC](https://forums.ankiweb.net/t/data-base-problem/12569/19 "2023-05-01T04:07:16Z")

</div>

Closed on May 1, 2023, 4:07am UTC


