22.0 Using DBeaver to Export SQL Query Results

The following section explains how to use DBeaver with ZENworks zone database to query and export the data into a CSV file.

  1. Install DBeaver on a workstation (not on the ZENworks Primary Server).

  2. Open the DBeaver, click Connections, and then select Create Connection.

  3. Select PostgreSQL.

    Edit the connection properties as shown in the below image.

    On the Primary Server, run zman dgc to get the zenadmin and password.

    Go to zdm.xml to collect the database name.

    • On Linux: /etc/opt/microfocus/zenworks/datamodel

    • On Windows: %ZENSERVER_HOME%\conf\datamodel

  4. After connecting, right click on the database on the left side and select SQL Editor > Open SQL Script as show in the below image, and start executing SQL queries.

  5. Go to > Window > Preferences > DBeaver > Editors > Data Editor > Lob Editors > Binary data formatter and then select “Hex”.

  6. Right click on all the results of the query.

    NOTE:For some tables where comma delimited is not useful (example inventory tables) just copy the results and paste into Excel.

  7. Select Export Data, and then select CSV.

    Ensure that the output includes hex formatting for the binary fields.

  8. Send the resulting CSV file.