Skip to content

The cta-catalogue-schema-verify tool

Introduction

cta-catalogue-schema-verify verifies that the CTA Catalogue schema in the database conforms to the definition of the correct version of the schema.

How to run the tool

$ cta-catalogue-schema-verify /path/to/cta-catalogue.conf
The configuration file format is identical to the format used by the CTA Frontend and tape servers.

What the tool checks

  • Schema version ("database-to-check")

  • Compare table names, column names and types to the database-to-check schema version

  • Compare constraint names with the ones corresponding to the database-to-check schema version

    → Not NOT NULL constraint names for PostgreSQL

  • Compare index names

  • Display warnings if some tables have been set as PARALLEL (Oracle)

  • Display warnings if some Oracle TYPE are detected in the catalogue database

  • Display warnings if some Oracle SYNONYM are detected in the catalogue database

  • Display warnings if some Oracle ERROR checking tables are detected in the catalogue database

  • Display warnings if some Oracle stored procedures are found in the catalogue database

The tool returns a non-zero exit code if any errors are detected.

Example of output

$ cta-catalogue-schema-verify /etc/cta/cta-catalogue.conf
Schema version : 2.0
Checking indexes...
  SUCCESS
Checking tables, columns and constraints...
  ERROR: TABLE TEMP_REMOVE_CASTOR_METADATA is missing in the schema but is defined in the catalogue database.
  FAILED
Status of the checking : FAILED
  WARNING: TABLE ARCHIVE_FILE is set as PARALLEL
  WARNING: TABLE TAPE_FILE is set as PARALLEL
  WARNING: PROCEDURE IMPORTFROMCASTOR exists in the catalogue database
  WARNING: PROCEDURE IMPORTTAPEPOOL exists in the catalogue database
  WARNING: PROCEDURE POPULATECTAFILESFROMCASTOR exists in the catalogue database
  WARNING: PROCEDURE REMOVECASTORMETADATA exists in the catalogue database
  WARNING: SYNONYM VMGR_TAPE_INFO exists in the catalogue database
  WARNING: SYNONYM VMGR_TAPE_SIDE exists in the catalogue database
  WARNING: TYPE NUMLIST exists in the catalogue database
  WARNING: Error logging table ERR$_TAPE_FILE exists in the catalogue database