<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>idea Procedure to recover a corrupted SQLite3 ArcGIS Mobile cache database in ArcGIS Collector Ideas</title>
    <link>https://community.esri.com/t5/arcgis-collector-ideas/procedure-to-recover-a-corrupted-sqlite3-arcgis/idi-p/939579</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN style="font-size: medium;"&gt;&lt;SPAN style="font-family: calibri;"&gt;This document pertains to ArcGIS Mobile databases that has become corrupted. ArcGIS utilises SQLite for most of their mobile databases including Collector on iOS, Collector on Android and ArcGIS for Windows Mobile. This document focuses on corrupted ArcGIS for Windows Mobile cache databases but can probably be utilised for the other platforms as well.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;&lt;U&gt;&lt;SPAN style="font-size: medium;"&gt;&lt;SPAN style="font-family: calibri;"&gt;Procedure:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;BR /&gt;&lt;SPAN style="font-size: medium;"&gt;&lt;SPAN style="font-family: calibri;"&gt;Download and install the Sqlite3 command line shell program from:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://www.sqlite.org/download.html" target="_blank"&gt;&lt;SPAN style="font-size: medium;"&gt;&lt;SPAN style="font-family: calibri;"&gt;&lt;SPAN style="color: rgb(5, 99, 193);"&gt;https://www.sqlite.org/download.html&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;BR /&gt;&lt;SPAN style="font-size: medium;"&gt;&lt;SPAN style="font-family: calibri;"&gt;On Windows 8 Professional I installed: &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;A href="https://www.sqlite.org/2015/sqlite-shell-win32-x86-3081000.zip" target="_blank"&gt;&lt;SPAN style="font-size: medium;"&gt;&lt;SPAN style="font-family: calibri;"&gt;&lt;SPAN style="color: rgb(5, 99, 193);"&gt;sqlite-shell-win32-x86-3081000.zip&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;BR /&gt;&lt;SPAN style="font-size: medium;"&gt;&lt;SPAN style="font-family: calibri;"&gt;Copy the MobileCache.db file to the location where you installed Sqlite – this just makes it easier to work with the database – and you have a copy of the database.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: medium;"&gt;&lt;SPAN style="font-family: calibri;"&gt;Run the Sqlite3.exe command line utility.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-size: medium;"&gt;&lt;SPAN style="font-family: calibri;"&gt;In the command line do the following:&lt;BR /&gt;&lt;IMG alt="0EME0000000HQRZ" __migration_original_url="https://c.na9.content.force.com/servlet/rtaImage?eid=087E0000000CxVw&amp;amp;feoid=Body&amp;amp;refid=0EME0000000HQRZ" __migration_image_ext="0EME0000000HQRZ" class="jive-image" src="https://community.esri.com/legacyfs/online/202379_0EME0000000HQRZ" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;I&gt;&lt;SPAN style="font-size: medium;"&gt;&lt;SPAN style="font-family: calibri;"&gt;The first line (.open MobileCache.db) opens the cache database. The second to fourth lines scripts the database contents to a text file.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;BR /&gt;&lt;SPAN style="font-size: medium;"&gt;&lt;SPAN style="font-family: calibri;"&gt;Close the command line editor with .exit once the dump has completed. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-size: medium;"&gt;&lt;SPAN style="font-family: calibri;"&gt;Open a new Sqlite session again and do the following:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;IMG alt="0EME0000000HQRe" style="height: 161px; width: 500px;" __migration_original_url="https://c.na9.content.force.com/servlet/rtaImage?eid=087E0000000CxVw&amp;amp;feoid=Body&amp;amp;refid=0EME0000000HQRe" __migration_image_ext="0EME0000000HQRe" class="jive-image" src="https://community.esri.com/legacyfs/online/202380_0EME0000000HQRe" /&gt;
&lt;P style=""&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;The first line (.open NewDatabase.db) creates a new database – so make sure this name is unique and does not refer to an existing file in the SQLite directory. The second line (.read dump_all.sql) executes the SQL database script that was created.&lt;/FONT&gt;&lt;/P&gt;

&lt;P style=""&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;By default the database errors will be skipped and the script will complete and create a new database.&lt;/FONT&gt;&lt;/P&gt;

&lt;P style=""&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Copy and rename this new database to MobileCache.db and overrite the original corrupted database in the ArcGIS Mobile project folder. Attempt to open the project with ArcGIS Mobile for Windows or ArcGIS Mobile for Windows Mobile.&lt;/FONT&gt;&lt;/P&gt;

&lt;P style="text-align: center;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;----------------------------------------------------- end -----------------------------------------------------&lt;/FONT&gt;&lt;/P&gt;
&lt;BR /&gt;&amp;nbsp;

&lt;!-- content transformation source ID: 087E0000000CxVw --&gt;

&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 May 2015 11:13:41 GMT</pubDate>
    <dc:creator>LawrenceKeefe</dc:creator>
    <dc:date>2015-05-13T11:13:41Z</dc:date>
    <item>
      <title>Procedure to recover a corrupted SQLite3 ArcGIS Mobile cache database</title>
      <link>https://community.esri.com/t5/arcgis-collector-ideas/procedure-to-recover-a-corrupted-sqlite3-arcgis/idi-p/939579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN style="font-size: medium;"&gt;&lt;SPAN style="font-family: calibri;"&gt;This document pertains to ArcGIS Mobile databases that has become corrupted. ArcGIS utilises SQLite for most of their mobile databases including Collector on iOS, Collector on Android and ArcGIS for Windows Mobile. This document focuses on corrupted ArcGIS for Windows Mobile cache databases but can probably be utilised for the other platforms as well.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;&lt;U&gt;&lt;SPAN style="font-size: medium;"&gt;&lt;SPAN style="font-family: calibri;"&gt;Procedure:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;BR /&gt;&lt;SPAN style="font-size: medium;"&gt;&lt;SPAN style="font-family: calibri;"&gt;Download and install the Sqlite3 command line shell program from:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://www.sqlite.org/download.html" target="_blank"&gt;&lt;SPAN style="font-size: medium;"&gt;&lt;SPAN style="font-family: calibri;"&gt;&lt;SPAN style="color: rgb(5, 99, 193);"&gt;https://www.sqlite.org/download.html&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;BR /&gt;&lt;SPAN style="font-size: medium;"&gt;&lt;SPAN style="font-family: calibri;"&gt;On Windows 8 Professional I installed: &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;A href="https://www.sqlite.org/2015/sqlite-shell-win32-x86-3081000.zip" target="_blank"&gt;&lt;SPAN style="font-size: medium;"&gt;&lt;SPAN style="font-family: calibri;"&gt;&lt;SPAN style="color: rgb(5, 99, 193);"&gt;sqlite-shell-win32-x86-3081000.zip&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;BR /&gt;&lt;SPAN style="font-size: medium;"&gt;&lt;SPAN style="font-family: calibri;"&gt;Copy the MobileCache.db file to the location where you installed Sqlite – this just makes it easier to work with the database – and you have a copy of the database.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: medium;"&gt;&lt;SPAN style="font-family: calibri;"&gt;Run the Sqlite3.exe command line utility.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-size: medium;"&gt;&lt;SPAN style="font-family: calibri;"&gt;In the command line do the following:&lt;BR /&gt;&lt;IMG alt="0EME0000000HQRZ" __migration_original_url="https://c.na9.content.force.com/servlet/rtaImage?eid=087E0000000CxVw&amp;amp;feoid=Body&amp;amp;refid=0EME0000000HQRZ" __migration_image_ext="0EME0000000HQRZ" class="jive-image" src="https://community.esri.com/legacyfs/online/202379_0EME0000000HQRZ" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;I&gt;&lt;SPAN style="font-size: medium;"&gt;&lt;SPAN style="font-family: calibri;"&gt;The first line (.open MobileCache.db) opens the cache database. The second to fourth lines scripts the database contents to a text file.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;BR /&gt;&lt;SPAN style="font-size: medium;"&gt;&lt;SPAN style="font-family: calibri;"&gt;Close the command line editor with .exit once the dump has completed. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-size: medium;"&gt;&lt;SPAN style="font-family: calibri;"&gt;Open a new Sqlite session again and do the following:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;IMG alt="0EME0000000HQRe" style="height: 161px; width: 500px;" __migration_original_url="https://c.na9.content.force.com/servlet/rtaImage?eid=087E0000000CxVw&amp;amp;feoid=Body&amp;amp;refid=0EME0000000HQRe" __migration_image_ext="0EME0000000HQRe" class="jive-image" src="https://community.esri.com/legacyfs/online/202380_0EME0000000HQRe" /&gt;
&lt;P style=""&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;The first line (.open NewDatabase.db) creates a new database – so make sure this name is unique and does not refer to an existing file in the SQLite directory. The second line (.read dump_all.sql) executes the SQL database script that was created.&lt;/FONT&gt;&lt;/P&gt;

&lt;P style=""&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;By default the database errors will be skipped and the script will complete and create a new database.&lt;/FONT&gt;&lt;/P&gt;

&lt;P style=""&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Copy and rename this new database to MobileCache.db and overrite the original corrupted database in the ArcGIS Mobile project folder. Attempt to open the project with ArcGIS Mobile for Windows or ArcGIS Mobile for Windows Mobile.&lt;/FONT&gt;&lt;/P&gt;

&lt;P style="text-align: center;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;----------------------------------------------------- end -----------------------------------------------------&lt;/FONT&gt;&lt;/P&gt;
&lt;BR /&gt;&amp;nbsp;

&lt;!-- content transformation source ID: 087E0000000CxVw --&gt;

&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 11:13:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-collector-ideas/procedure-to-recover-a-corrupted-sqlite3-arcgis/idi-p/939579</guid>
      <dc:creator>LawrenceKeefe</dc:creator>
      <dc:date>2015-05-13T11:13:41Z</dc:date>
    </item>
  </channel>
</rss>

