Class DB2LUWDatabaseStatsExtractor

java.lang.Object
org.odpi.openmetadata.adapters.connectors.db2luw.survey.DB2LUWDatabaseStatsExtractor

public class DB2LUWDatabaseStatsExtractor extends Object
DB2LUWDatabaseStatsExtractor gathers the same measurements as the PostgreSQL equivalent (org.odpi.openmetadata.adapters.connectors.postgres.survey.PostgresDatabaseStatsExtractor) but sources them from Db2 for Linux, UNIX and Windows' system catalog views (SYSCAT.SCHEMATA, SYSCAT.TABLES, SYSCAT.VIEWS, SYSCAT.COLUMNS, SYSCAT.COLDIST, SYSCAT.INDEXES, SYSCAT.TRIGGERS, SYSIBMADM.ADMINTABINFO, SYSIBMADM.MON_TAB_STATS) instead of pg_catalog. All of these sources are metadata/statistics only - no user data is read.

Unlike Oracle (whose CDB root can see every pluggable database's size through a single cross-container connection before looping per-PDB for schema detail), Db2 for Linux, UNIX and Windows has no catalog view that spans multiple databases - every one of the views above is already scoped to whichever single database the connection is attached to. Consequently getDatabaseStatistics() here is called once per database, on a connection to that specific database, rather than once up front on a shared connection.
  • Constructor Details

    • DB2LUWDatabaseStatsExtractor

      public DB2LUWDatabaseStatsExtractor(List<String> validDatabases, SurveyActionServiceConnector surveyActionServiceConnector)
      Constructor sets up the list of databases to process and the connection to the database.
      Parameters:
      validDatabases - list of database names
      surveyActionServiceConnector - calling connector