Extracting data from MS Access files on MacOS X

The only real way that I’ve found to extract data from an MS Access .mdb file on MacOS X is to use mdbtools. If you aren’t familiar with the unix underpinnings of MacOS X, this information might be too much for you. Otherwise, this is a step-by-step list of what I had to do to get mdbtools to compile and get useful data from a .mdb

The only real way that I’ve found to extract data from an MS Access .mdb file on MacOS X is to use mdbtools. If you aren’t familiar with the unix underpinnings of MacOS X, this information might be too much for you. Otherwise, here’s a list of what I had to do to get mdbtools to compile.

Prerequisites

Before I could successfully compile mdbtools, I had to install the following from source:

If you don’t know how to build those packages, you might be in trouble already. If you need a reminder:

  1. ./configure
  2. make
  3. sudo make install

Installing mdb-tools

Once you’ve got the prerequisites installed, you can download mdb-tools using the cvs instructions found at http://mdbtools.sourceforge.net/. Don’t try to just download the source from the site, use the cvs instructions. You might get a warning from the cvs login command, but you can ignore that. Following the download instructions will get the source files from the developers’ cvs repository to an ‘mdbtools’ directory on your Mac.

From the newly created mdbtools directory, run the following commands to install mdbtools:

  1. ./autogen.sh
  2. make
  3. sudo make install

If you encounter errors at any point in there, you should make sure that you really do have everything listed in the Prerequisites section above. You should also make sure that your PATH environment variable lists /usr/local/bin (where any binaries that you installed above reside) before /usr/bin (where the Apple-installed commands live).

Using mdbtools with your .mdb file

Once you’ve got everything installed, you can get an idea of what commands are available by getting to a shell prompt and typing ‘mdb-‘ followed by the tab key. Since all of the mdbtools commands start with ‘mdb-‘, the shell’s command-completion is giving you a list of those executables that were installed above. Since you’re not likely to find any documentation on any of the commands, you’ll have to type the name of the executable without any parameters to get any information about what parameters it’s expecting. For a good explanation of what you can do with these tools, read this article on the Oracle site.

Good luck.