The dba module provides Drupal administrators with direct access to their Drupal database tables from within the standard Drupal user interface. It is possible to execute scripts to create and alter tables, to backup one or more tables, to view/edit/delete data within tables, and to emtpy or drop tables. If using MySQL, it is also possible to check and repair tables.

Screenshots available.

WARNING: If a user is granted (or manages to aquire) 'dba adminster database' permissions, they are able to directly alter the database. At minimum, they are able to modify data, and possibly to drop tables. Depending on how you have defined your database permissions, the user may also be able to modify other databases unrelated to your Drupal installation. Use at your own risk!

Drupal 7 port
The following features are currently implemented in the Drupal 7 version of this module:

  • Can list all tables in your default database
  • Can view data from one or more tables
  • Can describe one or more tables
  • Generates annotated mysqlreport output for MySQL databases
  • Generates limited annotated report output for PostgreSQL databases
  • Can export data from one ore more tables into any of the following formats:
    • CSV
    • HTML
    • mysqldump (only works with MySQL databases)
    • OpenOffice Spreadsheet
    • OpenOffice Document
    • Microsoft Excel
    • Microsoft Word.
  • Can truncate one or more tables
  • Fully supports MySQL, PostgreSQL and SQLite
  • Drush integration
    • drush dba-sqlreport (mysqlreport output on command line)

An article about the Drupal 7 version of this module.

Not yet implemented features that existed in pre-Drupal 7 versions of the module:

  • ability to execute sql scripts and see the resulting output (ie, create/alter/update tables)
  • overview table listing including total row counts for each
  • ability to drop one or more tables at a time
  • ability to edit a specific row (using simple form)
  • ability to delete a specific row
  • in MySQL, ability to check and repair one or more tables at a time

Project Information

Downloads