Saturday, March 2, 2013

Sqlite Manager for Mac

This post describes a solution for Mac, but can also be used for Windows and Linux with some modifications.



If you want a free solution to manage your not so big Sqlite databases probably the best option for you is sqlite-manager which initially was just a Firefox add-on. Now it is also shipped as a xulrunner application. A complete list of supported applications can be found here.

Firefox or Thunderbird fans can easily install a plugin and be all set, but if you don't want to have some arbitrary software which main purpose is not managing databases, then you might like to go with standalone xulrunner application.

Kiveo's intention has been good, but is now outdated and in fact I couldn't set up anything. Here is how the process works for sqlitemanager-xr-0.7.7-all.zip.

Installation

  1. Get sqlitemanager-xr-0.7.7-all.zip
  2. Unpack sqlitemanager-xr-0.7.7-all.zip
  3. Install xulrunner-2.0.en-US.mac-pkg.dmg
  4. Run
    /Library/Frameworks/XUL.framework/xulrunner-bin --install-app /absolute/path/to/unpacked/sqlitemanager-xr-0.7.7-all
    This will install sqlite-manager application to /Applications/lazierthanthou/sqlite-manager.app which can be run from Applications if you open it in Finder
    Note: path must be absolute
  5. For convenience, move sqlite-manager to Applications root. Just open Applications in Finder, drag sqlite-manager from lazierthanthou folder and drop into Applications root. lazierthanthou  folder can be deleted
  6. That's it. Now sqlite-manager can be accessed from Launchpad
  7. xulrunner-2.0.en-US.mac-pkg.dmg and sqlitemanager-xr-0.7.7-all.zip and unpacked folder can be deleted.
Notes: sqlitemanager-xr-0.7.7-all in its application.ini says that it can be run with xulrunner starting from version 2.0 up to version 11.0a1. I tried to run sqlite manager with xulrunner 11.0 and 10.0, but that didn't work. 2.0 works for sure. 

Deinstallation

To completely uninstall sqlite-manager and xulrunner do this:
  1. For sqlite-manager just open Finder and drag sqlite-manager to the Trash
  2. To remove xulrunner, open up Terminal and:
    1. sudo rm /private/var/db/receipts/org.mozilla.xulrunner.bom  /private/var/db/receipts/org.mozilla.xulrunner.plist
    2. sudo rm -fr /Library/Frameworks/XUL.framework/

Troubleshooting

sqlite-manager is a very nice tool which supports in-memory databases. It supports import from SQL, XML and CSV. It also supports export to SQL, XML and CSV, but as for version sqlitemanager-xr-0.7.7-all it doesn't support export from in-memory database, only from disk database. If you try to export from in-memory database sqlite-manager will do nothing. Quietly. To somehow understand what's going on (not only in this case), go to Tools->Options, open User Interface tab and under Toolbar Settings tick Show the Debug toolbar. After that's done you may notice that gear and terminal icons have appeared on the top right corner of sqlite-manager main window. Click on gear icon will bring you to options menu which developer doesn't recommend to alter. Click on terminal window will show an informational window with everything what happens in sqlite-manager. Log viewer in other words. So, if you don't understand what's going on in your sqlite-manager, just open up terminal and view the logs. Those are fairly informative and you'll have a big chance to understand the problem.