<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Alan.Alexander</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Alan.Alexander"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Alan.Alexander"/>
	<updated>2026-05-18T05:38:43Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=How_to_repair_the_database_files&amp;diff=33426</id>
		<title>How to repair the database files</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=How_to_repair_the_database_files&amp;diff=33426"/>
		<updated>2012-09-17T00:23:27Z</updated>

		<summary type="html">&lt;p&gt;Alan.Alexander: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==You might be OK==&lt;br /&gt;
There might be nothing to worry about. Check these points:&lt;br /&gt;
* Did you come to this page because of a message you saw in the server console or logs?&lt;br /&gt;
* Is the following text at the start of the error message block?&lt;br /&gt;
    ERROR: near &amp;quot;3&amp;quot;: syntax error&lt;br /&gt;
* If so, then everything is OK. You don't have to do anything written below and you can safely ignore the error message.&lt;br /&gt;
&lt;br /&gt;
==Warnings==&lt;br /&gt;
'''Backup all files before attempting a repair!'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Shutdown the server before attempting a repair!'''&lt;br /&gt;
&lt;br /&gt;
==Windows server==&lt;br /&gt;
&lt;br /&gt;
===Easy way===&lt;br /&gt;
*Download [http://updatesa.mtasa.com/sa/files/sqlite/mtasa-db-repair-win.zip this]&lt;br /&gt;
*Unzip and put the files into ''server/mods/deathmatch/''&lt;br /&gt;
*Double click on ''sqlite_repair_internal_db.bat'' to repair internal.db&lt;br /&gt;
*Double click on ''sqlite_repair_registry_db.bat'' to repair registry.db&lt;br /&gt;
&lt;br /&gt;
===Hard way===&lt;br /&gt;
&lt;br /&gt;
*Download sqlite-shell-win32 from [http://www.sqlite.org/sqlite-shell-win32-x86-3070700.zip here]. If that link fails, the main download page is [http://www.sqlite.org/download.html here].&lt;br /&gt;
*Unzip and put sqlite3.exe into ''server/mods/deathmatch/''&lt;br /&gt;
*Open command prompt the change directory to ''server/mods/deathmatch/''&lt;br /&gt;
*To repair internal.db:&lt;br /&gt;
**Copy '''internal.db''' to '''internal_original.db'''&lt;br /&gt;
**Do this command: '''sqlite3.exe internal_original.db .dump | sqlite3.exe internal_repaired.db'''&lt;br /&gt;
**Copy '''internal_repaired.db''' to '''internal.db'''&lt;br /&gt;
&lt;br /&gt;
*To repair registry.db:&lt;br /&gt;
**Copy '''registry.db''' to '''registry_original.db'''&lt;br /&gt;
**Do this command: '''sqlite3.exe registry_original.db .dump | sqlite3.exe registry_repaired.db'''&lt;br /&gt;
**Copy '''registry_repaired.db''' to '''registry.db'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Linux server==&lt;br /&gt;
&lt;br /&gt;
===Only way===&lt;br /&gt;
(You can use the easy way by copying the DB from linux to windows, and use the method used on windows PC's)&lt;br /&gt;
*Download sqlite-shell-linux from [http://www.sqlite.org/sqlite-shell-linux-x86-3070700.zip here]. If that link fails, the main download page is [http://www.sqlite.org/download.html here].&lt;br /&gt;
*Unzip and put sqlite3 into ''server/mods/deathmatch/''&lt;br /&gt;
*To repair internal.db:&lt;br /&gt;
**Copy '''internal.db''' to '''internal_original.db'''&lt;br /&gt;
**Do this command: '''./sqlite3 internal_original.db .dump | ./sqlite3 internal_repaired.db'''&lt;br /&gt;
**Copy '''internal_repaired.db''' to '''internal.db'''&lt;br /&gt;
&amp;lt;section name=&amp;quot;Commands&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
cp internal.db internal_original.db&lt;br /&gt;
./sqlite3 internal_original.db .dump | ./sqlite3 internal_repaired.db&lt;br /&gt;
cp internal_repaired.db internal.db&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*To repair registry.db:&lt;br /&gt;
**Copy '''registry.db''' to '''registry_original.db'''&lt;br /&gt;
**Do this command: '''./sqlite3 registry_original.db .dump | ./sqlite3 registry_repaired.db'''&lt;br /&gt;
**Copy '''registry_repaired.db''' to '''registry.db'''&lt;br /&gt;
&amp;lt;section name=&amp;quot;Commands&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
cp registry.db registry_original.db&lt;br /&gt;
./sqlite3 registry_original.db .dump | ./sqlite3 registry_repaired.db&lt;br /&gt;
cp registry_repaired.db registry.db&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Support]]&lt;br /&gt;
[[ru:How to repair the database files]]&lt;/div&gt;</summary>
		<author><name>Alan.Alexander</name></author>
	</entry>
</feed>