The source Postgres client is configured to work with SQL_ASCI encoding which uses the first 127 bytes, similar to UTF8. The target database is configured to work with UTF8 but does not know that the source database is Latin1, and expects UTF8 encoding rules. Latin1 encoding of umlaut characters for example does not comply with UTF8 encoding rules, and the following error occurs during a migration to a new version and Postgres database: Invalid byte sequence for encoding UTF8 |
Unix steps: 1) Login to the Control-M/Enterprise Manager account 2) Navigate to the ctm_em directory 3) Backup the following files: cp .PGenv.csh .PGenv.csh.orig cp .PGenv.sh .PGenv.sh.orig 4) Edit the .PGenv.csh and search for the parameter PGCLIENTENCODING NOTE: Each file has a slightly different format. Retain the format and only change the value Original value: SQL_ASCII New value: LATIN1 5) Repeat step 4 for the file named and .PGenv.sh 5) Login to the Control-M/Server account 6) Navigate to the home directory (default when logging in) 7) Repeat steps 3 thru 5 above for the same two files, but here on the Control-M/Server account 8) Log out of both the Control-M/Enterprise Manager and Control-M/Server if still logged in, to refresh the environment and re-run the migration Windows steps: 1) Login to the Control-M/Enterprise Manager server host 2) Open Windows Explorer and right click This PC -> Properties 3) Select Advanced system settings 4) In the Advanced tab select Environment Variables 5) Under System variables find PGCLIENTENCODING = SQL_ASCII 6) Change to PGCLIENTENCODING = LATIN1 7) If the Control-M/Server is running on a different Windows host, login there and repeat steps 2 thru 6 8) Log out of both the Control-M/Enterprise Manager and Control-M/Server if still logged in, to refresh the environment and re-run the migration |