Skip to content

How to access query history database

Overview

All executed queries are stored in an internal H2 database.

H2 doesn’t support multiple active connections to the same embedded database. To avoid conflicts with the running system, make a copy of the internal database and connect to that copy:

Accessing the database

  1. Create the target folder inside the container.

    docker compose exec cloudbeaver-qm mkdir -p /opt/cloudbeaver/workspace/sample
    
  2. Copy the database folder.

    docker compose exec cloudbeaver-qm cp -r /opt/cloudbeaver/workspace/.metadata/qmdb/ /opt/cloudbeaver/workspace/sample/
    
  3. Connect to the H2 Embedded V.2 driver:

    Info

    The H2 Embedded V.2 driver might be disabled by default. To enable it, see Server configuration and administration.

  4. Open the QM_QUERY table to view the Query History.