Categories
Uncategorized

Cleaning the Dude Database

So as installs of the Dude v4beta are aging they are experiencing some database issues. This is due to a 2gig limit of the SQL version embedded with the Dude. So, if your dude database is crashing, complaining about being full, or just plain running slow it may be time for a cleaning. You can easily verify this by looking in the dude/data and at the “dude” db file. If this is around 2 gig it’s time for a cleaning.

To start you will need SQLLite for your version of Windows. These are available from https://www.sqlite.org/download.html. Simply get the precompiled binary for your OS. For ease of sake Put your SQLite3 .exe in the same director as your dude database. This makes commands much simpler.

Follow these steps to clean the database:

1. Stop Dude service
Make sure to kill the dude process. Simply closing out of it does not fix. I had to go into task manager and end “dude.exe”
2. Dump DB to text with SQLite. (echo .dump | sqlite3.exe dude.db > dude.sql)
3. Rename dude.db, delete any dude.db-journal and dude.viw files. Something like dude.db.old
4. Start Dude service, this should create a new, blank dude.db
5. Stop Dude service
6. Open the dude.sql you created in step 2. Delete everything from dude.sql except for the lines that say INSERT INTO “objs” (including the lines that create the tables and indexes and stuff, just the INSERT INTO “objs” lines should be left)
7. Open dude.db with SQLite and delete everything from the objs table (DELETE FROM objs;)
8. Read old objs values into new DB (.read dude.sql)
9. Start Dude service

20,000 records took me a few hours to read back in. Just let it run. If you are curious on progress have the window open with the dude.db file. You should see the size of it growing during the read process.