Тип экспорта TEST
позволяет проверить, что все объекты из БД Oracle были созданы в Postgres Pro. Для проверки стороны Postgres Pro необходимо задать PG_DSN
.
Обратите внимание, что эта функциональность учитывает ограничения имён схем, если заданы директивы EXPORT_SCHEMA
и SCHEMA
или PG_SCHEMA
. Если задана только директива EXPORT_SCHEMA
, сканируются все схемы в Oracle и Postgres Pro. Можно отфильтровать до одной схемы с помощью SCHEMA
и/или PG_SCHEMA
, но нельзя указать список схем. Чтобы протестировать список схем, вызывайте ora2pgpro несколько раз, отдельно указывая имя необходимой схемы по очереди.
ora2pgpro -t TEST -c config/ora2pgpro.conf > migration_diff.txt
Например, эта команда создаст файл с отчётом по всем объектам с подсчётом строк на обеих сторонах, Oracle и Postgres Pro, с отдельной секцией ошибок с описанием различий для каждого объекта. Пример результата:
[TEST INDEXES COUNT] ORACLEDB:DEPARTMENTS:2 POSTGRES:departments:1 ORACLEDB:EMPLOYEES:6 POSTGRES:employees:6 [ERRORS INDEXES COUNT] Table departments don't have the same number of indexes in Oracle (2) and in PostgreSQL (1). [TEST UNIQUE CONSTRAINTS COUNT] ORACLEDB:DEPARTMENTS:1 POSTGRES:departments:1 ORACLEDB:EMPLOYEES:1 POSTGRES:employees:1 [ERRORS UNIQUE CONSTRAINTS COUNT] OK, Oracle and PostgreSQL have the same number of unique constraints. [TEST PRIMARY KEYS COUNT] ORACLEDB:DEPARTMENTS:1 POSTGRES:departments:1 ORACLEDB:EMPLOYEES:1 POSTGRES:employees:1 [ERRORS PRIMARY KEYS COUNT] OK, Oracle and PostgreSQL have the same number of primary keys. [TEST CHECK CONSTRAINTS COUNT] ORACLEDB:DEPARTMENTS:1 POSTGRES:departments:1 ORACLEDB:EMPLOYEES:1 POSTGRES:employees:1 [ERRORS CHECK CONSTRAINTS COUNT] OK, Oracle and PostgreSQL have the same number of check constraints. [TEST NOT NULL CONSTRAINTS COUNT] ORACLEDB:DEPARTMENTS:1 POSTGRES:departments:1 ORACLEDB:EMPLOYEES:1 POSTGRES:employees:1 [ERRORS NOT NULL CONSTRAINTS COUNT] OK, Oracle and PostgreSQL have the same number of not null constraints. [TEST COLUMN DEFAULT VALUE COUNT] ORACLEDB:DEPARTMENTS:1 POSTGRES:departments:1 ORACLEDB:EMPLOYEES:1 POSTGRES:employees:1 [ERRORS COLUMN DEFAULT VALUE COUNT] OK, Oracle and PostgreSQL have the same number of column default value. [TEST IDENTITY COLUMN COUNT] ORACLEDB:DEPARTMENTS:1 POSTGRES:departments:1 ORACLEDB:EMPLOYEES:0 POSTGRES:employees:0 [ERRORS IDENTITY COLUMN COUNT] OK, Oracle and PostgreSQL have the same number of identity column. [TEST FOREIGN KEYS COUNT] ORACLEDB:DEPARTMENTS:0 POSTGRES:departments:0 ORACLEDB:EMPLOYEES:1 POSTGRES:employees:1 [ERRORS FOREIGN KEYS COUNT] OK, Oracle and PostgreSQL have the same number of foreign keys. [TEST TABLE COUNT] ORACLEDB:TABLE:2 POSTGRES:TABLE:2 [ERRORS TABLE COUNT] OK, Oracle and PostgreSQL have the same number of TABLE. [TEST TABLE TRIGGERS COUNT] ORACLEDB:DEPARTMENTS:0 POSTGRES:departments:0 ORACLEDB:EMPLOYEES:1 POSTGRES:employees:1 [ERRORS TABLE TRIGGERS COUNT] OK, Oracle and PostgreSQL have the same number of table triggers. [TEST TRIGGER COUNT] ORACLEDB:TRIGGER:2 POSTGRES:TRIGGER:2 [ERRORS TRIGGER COUNT] OK, Oracle and PostgreSQL have the same number of TRIGGER. [TEST VIEW COUNT] ORACLEDB:VIEW:1 POSTGRES:VIEW:1 [ERRORS VIEW COUNT] OK, Oracle and PostgreSQL have the same number of VIEW. [TEST MVIEW COUNT] ORACLEDB:MVIEW:0 POSTGRES:MVIEW:0 [ERRORS MVIEW COUNT] OK, Oracle and PostgreSQL have the same number of MVIEW. [TEST SEQUENCE COUNT] ORACLEDB:SEQUENCE:1 POSTGRES:SEQUENCE:0 [ERRORS SEQUENCE COUNT] SEQUENCE does not have the same count in Oracle (1) and in PostgreSQL (0). [TEST TYPE COUNT] ORACLEDB:TYPE:1 POSTGRES:TYPE:0 [ERRORS TYPE COUNT] TYPE does not have the same count in Oracle (1) and in PostgreSQL (0). [TEST FDW COUNT] ORACLEDB:FDW:0 POSTGRES:FDW:0 [ERRORS FDW COUNT] OK, Oracle and PostgreSQL have the same number of FDW. [TEST FUNCTION COUNT] ORACLEDB:FUNCTION:3 POSTGRES:FUNCTION:3 [ERRORS FUNCTION COUNT] OK, Oracle and PostgreSQL have the same number of functions. [TEST SEQUENCE VALUES] ORACLEDB:EMPLOYEES_NUM_SEQ:1285 POSTGRES:employees_num_seq:1285 [ERRORS SEQUENCE VALUES COUNT] OK, Oracle and PostgreSQL have the same values for sequences [TEST ROWS COUNT] ORACLEDB:DEPARTMENTS:27 POSTGRES:departments:27 ORACLEDB:EMPLOYEES:854 POSTGRES:employees:854 [ERRORS ROWS COUNT] OK, Oracle and PostgreSQL have the same number of rows.