Performance Warehouse migration or creation failed

Environment

AppMon: 6.3+

Symptoms

The database versioning tool FlyWay was not able to create or access its data table schema_version. In the Repository logs, messages like

Found non-empty schema [MS\apmuser] without metadata table! Use baseline() or set baselineOnMigrate to true to initialize the metadata table.

or

Found non-empty schema "DT_APM " without metadata table! Use baseline() or set baselineOnMigrate to true to initialize the metadata table.

are shown.

Solution

Manually set the schema name for FlyWay. In the directory DT_HOME/server/conf , create a file called flyway.properties and set the PWH schema name manually using flyway.schemas=<schema name>, e.g. flyway.schemas=DT_APM

Note

If the used DBMS is MS SQL Server and the logs indicates a schema name, containing a backslash (e.g. "MS\apmuser"), a new schema for the schema_version table must be created, as the used JDBC driver blocks schema names, containing a backslash. The properties file must than point to the newly created schema, e.g. flyway.schemas=apmuserschema.

Root cause

The database versioning tool FlyWay was not able to create or access its data table schema_version. The main reasons for this are too short schema names on DB2 (must be exactly 8 characters to work by default) or a Windows domain name in the schema name (which is separated by a backslash). Also permission issues can cause the need of a manual setup of the schema.