Version 17.6

@darold darold released this Nov 17, 2016 · 48 commits to master since this release

2016 11 17 - v17.6

This release adds several new features:

  • Adds export of Oracle Text Indexes into FTS or pg_trgm based indexes,
  • Add export of indexes defined on materialized views
  • Allow export of materialized views as foreign tables when export type is FDW.
  • Add replacement of trim() by btrim().

Two new configuration directives have been added:

  • USE_INDEX_OPCLASS: when value is set to 1, this will force Ora2Pg to export all indexes defined on varchar2() and char() columns using *_pattern_ops operators. If you set it to a value greater than 1 it will only change indexes on columns where the character limit is greater or equal than this value.

  • CONTEXT_AS_TRGM: when enabled it forces Ora2Pg to translate Oracle Text indexes into PostgreSQL indexes using pg_trgm extension. Default is to translate CONTEXT indexes into FTS indexes and CTXCAT indexes using pg_trgm. Some time using pg_trgm based indexes is enough.

There's also some fix of issues reported by users, here is the complete list of changes:

  • Fixed non-use of custom temp_dir (-T). Thanks to Sebastian Albert for the patch.
  • Make export of FTS indexes from materialized view work as for tables.
  • Fix drop of indexes during export of data when DROP_INDEXES is enabled.
  • Remove double quote in function and procedure name from an input file to avoid creating a file with double quote in its name.
  • Fix export of unique index associated to a primary key.
  • Move OPTION (key "yes") of FDW table before NOT NUL constraint and default clause.
  • Fix some encoding issue during data export into file.
  • Rename FTS indexes prefix output file into FTS_INDEXES and export CTXCAT Oracle indexes as GIN pg_trgm indexes instead of FTS indexes.
  • Add export of indexes of type CTXCAT as FTS indexes.
  • Export triggers and update order for FTS indexes to separate file prefixed with FTS_INDEXES.
  • Exclude from export synonyms starting with a slash that correspond to incomplete deleted synonyms. Thanks to Nouredine Mallem for the report.
  • Add export of indexes defined on materialized views. Thanks to Nouredine Mallem for the report.
  • Fix export of foreign key and FTS indexes when looking at dba_* tables and multiple different schemas have the same fk or context indexes definition. Thanks to Nouredine Mallemfor the patch.
  • Fix export of CONTEXT or FULLTEXT Oracle index into PostgreSQL FTS with trigger and initial update statement.
  • Add configuration directive USE_INDEX_OPCLASS to force Ora2Pg to export all indexes defined on varchar2() and char() columns using those operators. A value greater than 1 will only change indexes on columns where the character limit is greater or equal than this value.
  • Fix FDW export of mysql tables. Thanks to yafeishi for the report.
  • Fix decode() rewrite. Thanks to Jean-Yves Julliot for the report.
  • Fix regression introduced into the export of NUMBER to integer like PG types.
  • Show partition name in progress bar instead of main table name.

Downloads

Version 17.5

@darold darold released this Oct 21, 2016 · 72 commits to master since this release

This is a maintenance release to fix several issues reported by users.
There is also some major improvements and new features.

There is a new configuration directive or change default behavior:

  • Fix export of CLOBs and NCLOB that was truncated to 64 Kb.
  • PG_BACKGROUND : when enabled autonomous transactions will be built using Robert Haas extension pg_background instead of dblink. Default is to still used dblink as pg_background is available only for PostgreSQL >= 9.5.
  • All Perl I/O now use the open pragma instead of calling method binmode(). This will force input and output to utf8 using the Perl pragma: use open ':encoding(utf8)'; when configuration directive BINMODE is not set or NLS_LANG is set to UTF8.
  • Ora2Pg will now export empty lob as empty string instead of NULL when the source column has NOT NULL constraint and that directive EMPTY_LOB_NULL is not activated.
  • Improve and fix progress bar especially when using JOBS/-J option.
  • Allow LOAD action to apply all settings defined in the input file on each opened session, this allow to use LOAD with export schema enabled. If settings are not set in the input file encoding and search_path is set from the ora2pg configuration settings.
  • NUMBER(*,0) is now exported as numeric(38) as well as a NUMBER with DATA_SCALE set to 0, no DATA_PRECISION and a DATA_LENGTH of 22. The last correspond to Oracle type INTEGER or INT.
  • Allow conversion of type with precision in DATA_TYPE directive. For example it is possible to transform all NUMBER(12,2) only into numeric(12,2) by escaping the comma. Example: DATA_TYPE NUMBER(12\,2):numeric(12\,2);...
  • Write data exported into temporary files (prefixed by tmp_) and renamed them at end of the export to be able to detect incomplete export and override it at next export.
  • Add export of type created in package declaration.
  • Export foreign key when the referenced table is not in the same schema.
  • Enabled by default PG_SUPPORTS_CHECKOPTION assuming that your Pg destination database is at least a 9.4 version.
  • Add 12 units to migration assessment report per table/column conflicting with a reserved word in PostgreSQL to reflect the need of code rewriting.
  • Output a warning when a column has the same name than a system column (xmin,xmax,ctid,etc.)
  • Replace SYSDATE by a call to clock_timestamp() instead of a call to LOCALTIMESTAMP in plpgsql code.
  • Add missing documentation about DISABLE_PARTITION directive used to not reproduce partitioning into PostgreSQL and only export partitioned data into the main table.

See changelog for a complete list of changes.

Downloads

Version 17.4

@darold darold released this Apr 21, 2016 · 158 commits to master since this release

2016 04 21 - v17.4

Errata in first release attempt.

  • Fix previous patch that does not handle blob case but just clob
  • Forgot to change back the query when EMPTY_LOB_NULL is not activated.
  • Put parenthesis around AT TIME ZONE expression

2016 04 20 - v17.4

This is a maintenance release to fix several issues reported by users.
There is also some major data export speed improvement thanks to the
work of PostgreSQL Pro and a new RPM spec file provided by Devrim
Gündüz to be able to build RPM package for Ora2Pg.

There is a new configuration directive:

  • EMPTY_LOB_NULL: when enabled force empty_clob() and empty_blob() to be exported as NULL instead as empty string.

See changelog for the complete list of changes.

Downloads

Version 17.3

@darold darold released this Mar 27, 2016 · 189 commits to master since this release

2016 03 26 - v17.3

This release fix two regressions introduced in latest release.

  • Fix major bug in data export. Thanks to Frederic Guiet for the report.
  • Fix another regression with character data that was not escaped. Thanks to Frederic Guiet for the report.

Please, upgrade.

Downloads

Version 17.2

@darold darold released this Mar 24, 2016 · 193 commits to master since this release

This is a maintenance release to fix several issues reported in new
LOB extraction method. There is also some feature improvement:

  • Allow NUMBER with precision to be replaced as boolean.
  • Allow full relocation of Ora2Pg installation using for example: perl Makefile.PL DESTDIR=/opt/ora2pg

Here is the complete list of other changes:

  • Allow NUMBER with precision to be replaced as boolean. Thanks to Silvan Auer for the report.
  • Force empty LOB to be exported as NULL when NO_LOB_LOCATOR is activated to have the same behavior.
  • Fix case where a LOB is NULL and ora2pg reports error : DBD::Oracle::db::ora_lob_read: locator is not of type OCILobLocatorPtr LOB initialised with EMPTY_CLOB() are also exported as NULL instead of \x
  • Fix replacement with PERFORM after MINUS. Thanks to Stephane Tachoires for the report.
  • Comment DBMS_OUTPUT.ENABLE calls. Thanks to Stephane Tachoire for the report.
  • Fix wrong replacement of SELECT by PERFORM after EXCEPT. Thanks to Stephane Tachoire for the report.
  • Apply ORACLE_COPIES automatic predicate on custom queries set with REPLACE_QUERY if possible. Thanks to pawelbs for the report.
  • Fix install of ora2pg.conf file in /etc/ instead of /etc/ora2pg/. Thanks to pawelbs for the report.
  • Add debug information before searching for custom type.
  • Attempt to fix error "ORA-01002: fetch out of sequence" when exporting data from a table with user defined types and ORACLE_COPIES. Thanks to pawelbs and Alex Ignatov fir the report.
  • Fix replacement of path to configuration file in scripts/ora2pg
  • Remove report sample from documentation about migration assessment report and replace it with a href link. Fix comment about export of domain index.
  • Always prefix table name with schema in Oracle row count, to prevent failure when the schema is not the connexion default.
  • Add pattern TOAD_PLAN_.* to the internal table exclusion list.
  • Fix modification of database owner search_path in import_all.sh auto generated script. Thanks to Stephane Tachoire for the report.

Downloads

Version 17.1

@darold darold released this Feb 29, 2016 · 211 commits to master since this release

This is a maintenance release to fix several issues reported in new
TEST action. There is also some feature improvement:

  • Add OPTIONS (key 'true') on table FDW export when a column is detected as a primary key.
  • Add DELETE configuration directive that allow a similar feature than the WHERE clause to replace TRUNCATE call by a "DELETE FROM table WHERE condition". This feature can be useful with regular "updates". Thanks to Sebastien Albert for the feature request.

Here is the complete list of other changes:

  • Fix the counter of user defined types and sequences in TEST action
  • Fix COPY import of data from column with user defined type with NULL value.
  • Fix DBD::Pg segmentation fault with direct INSERT import from column with user defined type.
  • Fix TEST action with multiple PG_SCHEMA export. Thanks to Michael Vitale for the report.
  • Fix documentation about PG_SCHEMA

Downloads

Version 17.0

@darold darold released this Feb 22, 2016 · 216 commits to master since this release

This new major release adds a new action type TEST to obtain a count of all objects, primary keys, constraints, etc., at both sides, Oracle and PostgreSQL, to perform a diff between the two database and verify that everything have been well imported. It also fixes several issues reported by users.

A new ora2pg command line option have been added to ora2pg script:

  • Add --count_rows command line option to perform a real row count on both side, Oracle and PostgreSQL, in TEST report.

See changelog for the complete list of changes and bugfixes:

Downloads

Version 16.2

@darold darold released this Jan 13, 2016 · 247 commits to master since this release

This release fixes several issues, is more accurate on migration
assessment report and adds some new ora2pg command line options:

  • Add --pg_dsn, --pg_user and --pg_pwd to be able to set the connection to import directly into PostgreSQL at command line.
  • Add -f option to script import_all.sh to force to not check user/database existing and skip their creation.

Potential backward compatibility issues:

  • PG_SUPPORTS_CHECKOPTION is now enabled by default, you may want to migrate to PostgreSQL 9.4 or above.
  • Remove modification of CLIENT_ENCODING in generic configuration file with --init_project, use the default instead.
  • Remove modification of directive NLS_LANG to AMERICAN_AMERICA.UTF8 in generic configuration file with --init_project, use the default instead.

See changelog the complete list of changes.

Downloads