LinuxCommandLibrary

mdbtools

Extract data from Access databases

SYNOPSIS

mdb-export [options] database-file table-name

PARAMETERS

database-file
    The path to the Microsoft Access .mdb database file.

table-name
    The name of the table within the database to export. This is required for mdb-export; omit to list tables with mdb-tables.

-H, --no-header
    Suppresses the printing of column names in the output.

-D delimiter, --delimiter=delimiter
    Specifies the column delimiter for CSV output. Default is a comma (,).

-Q quote-char, --quote=quote-char
    Specifies the character used to quote string values. Default is a double quote (").

-R delimiter, --row-delimiter=delimiter
    Specifies the row delimiter. Default is a newline character (\n).

-X, --xml
    Exports data in XML format.

-M, --html
    Exports data in HTML table format.

-I, --insert
    Exports data as SQL INSERT statements, suitable for importing into other databases.

-S, --schema
    Outputs the SQL schema (CREATE TABLE statements) for the specified table instead of data.

-J, --just-dump-schema
    Similar to --schema, dumps only the schema, no data.

-N, --no-memo
    Prevents the export of memo (long text) fields, which can sometimes cause issues or be very large.

-h, --help
    Displays a help message with available options.

-v, --version
    Displays the version information of the mdbtools suite.

DESCRIPTION

mdbtools is a collection of open-source utilities designed to read and export data from Microsoft Access (MDB) database files without needing Microsoft Access installed. It provides a suite of command-line tools that allow users to list tables, extract schema, export data into various formats (CSV, XML, HTML, SQL INSERT statements), and even run SQL queries against MDB files. This is particularly useful for Linux and Unix users who need to interact with Access databases for data migration, analysis, or integration with other systems. While it primarily supports older .mdb formats (up to Access 2003/2007), it offers crucial functionality for interoperability.

CAVEATS

mdbtools primarily supports Microsoft Access .mdb files up to version 2003 or 2007. It generally does not support the newer .accdb format (Access 2007 and later) without additional patches or tools. Complex queries, VBA macros, and some advanced Access features or data types might not be fully supported or correctly interpreted. Data corruption in the source MDB file can also lead to export failures.

OTHER COMMANDS IN THE MDBTOOLS SUITE

The mdbtools package includes several other specialized utilities beyond mdb-export:
mdb-tables: Lists all tables within an MDB database.
mdb-schema: Dumps the SQL schema (CREATE TABLE statements) for all or selected tables.
mdb-sql: Allows execution of simple SQL queries against an MDB database.
mdb-ver: Displays the version of an MDB file.
mdb-array: A utility for extracting data into a format suitable for scripting.
mdb-prop: Extracts properties of an MDB database.
mdb-hexdump: Dumps raw data from an MDB file, useful for debugging.

HISTORY

mdbtools was initiated in the early 2000s as a project to provide open-source access to Microsoft Access database files, addressing the lack of native tools for this format on non-Windows operating systems. Its development has been driven by the need for interoperability, allowing users to extract and migrate data from legacy Access applications without relying on proprietary Microsoft software.

SEE ALSO

sqlite3(1), csvtool(1), odbc(7), unixODBC(7)

Copied to clipboard