# Plugin DBAS

## About

The plugin provides tools for cleaning up database and simple SQL querying.

## Setup

| You can see (Database, SQL Query) the plugin operation in Demo System.

Make sure the plugin is enabled and adjust in the configuration if needed:

    # how many months old monthly or dropped by renaming tables and columns are proposed to be cleaned
    #dba:clean.older.than.months=12

## Usage

### Database Cleanup

Database overview tool is available in menu Administration / DBA / Database. The tool allows to drop not more needed tables and columns, offered by the plugin. There are 22 tables and 3 columns on the screen below.

The drop candidates can be outdated monthly tables.

Or not more used tables and columns, named with underscore prefix. Note, that if there is a _yyyyMMdd name suffix exists, the entity can be dropped only after configured amount of months.

All the chosen entities can be dropped with the button under the table.

With cleanup link right from DB state can be opened inconsistencies cleanup tool.

Amount of rows going to be removed are shown in right column.

### SQL Query

Is available in menu Administration / DBA / SQL Query

Provides simple querying. Also queries history is being maintained.