Skip to content

SQL-Abfrage als ZRXP-Datei ​

Die Sektion [table_to_zrxp] führt eine SQL-Abfrage auf einer Datenbank aus und schreibt die erste Spalte jeder Ergebniszeile als eine Zeile in die Datei OUTFILE (Latin-1), z. B. die Größe der Datenbank für das Monitoring.

powershell
prozessing.pyz ini/table_to_zrxp_xxxx.ini

INI-Datei: table_to_zrxp ​

ini
[table_to_zrxp]
OUTFILE = D:/Daten/spool/monitoring/tablespace.zrxp
SQL = SELECT SUM(NVL(bytes, 0)) / (1024 * 1024 * 1024)
    FROM dba_segments
; Oracle
DB_HOST = oracle.example.com
DB_PORT = 1521
DB_SERVICE_NAME = XE
DB_USER = xxx
DB_PASSWORD = xxx
DB_CLIENT = D:/TBBM/instantclient_21_10
DB_SCHEMA = WISKI
; oder Microsoft SQL Server bzw. PostgreSQL (DB_PORT = 5432)
;DB_NAME = WISKI7

Die Datenbank-Optionen entsprechen denen von [DB_WISKI], siehe Aktualitätsmonitoring.