The type of action called TEST
allows you to check that all objects from Oracle database have been created under Postgres Pro. PG_DSN
must be set to be able to check the Postgres Pro side.
Note that this feature respects the schema name limitation if EXPORT_SCHEMA
and SCHEMA
or PG_SCHEMA
are defined. If only EXPORT_SCHEMA
is set, all schemes from Oracle and Postgres Pro are scanned. You can filter to a single schema using SCHEMA
and/or PG_SCHEMA
but you can not filter by a list of schemas. To test a list of schema, you will have to repeat the calls to ora2pgpro by specifying a single schema each time.
ora2pgpro -t TEST -c config/ora2pgpro.conf > migration_diff.txt
For example, this command will create a file containing the report of all object and row count on both sides, Oracle and Postgres Pro, with an error section giving you the details of the differences for each kind of object. Here is a sample result:
[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.