You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am doing data validation from Oracle to PostgreSQL using row hash.
My Oracle database is remote, using WE8MSWIN1252 charset, while PostgreSQL is local to the Linux machine running DVT, using UTF8 in both Postgres and Linux locale.
The SQL used to compute the hash values in the source database is not converting the data to UTF8, as done in the target to calculate the same hash, which produces an error because the hashes do not match.
After troubleshooting the problem in the code, I was able to fix it by modifying the code that computes the hash in the source.
Below is an example with the data, the issue, the troubleshooting steps, and the proposed solution.
It uses one table, TEST_TBL, with one row having a multibyte char (å) in a column named data_col.
I have added a line before calling the hash function to convert the data to UTF8 (convert function), and also modified the hash call to use that modified source data instead of the original one. This is the code:
Summary
I am doing data validation from Oracle to PostgreSQL using row hash.
My Oracle database is remote, using WE8MSWIN1252 charset, while PostgreSQL is local to the Linux machine running DVT, using UTF8 in both Postgres and Linux locale.
The SQL used to compute the hash values in the source database is not converting the data to UTF8, as done in the target to calculate the same hash, which produces an error because the hashes do not match.
After troubleshooting the problem in the code, I was able to fix it by modifying the code that computes the hash in the source.
Below is an example with the data, the issue, the troubleshooting steps, and the proposed solution.
It uses one table, TEST_TBL, with one row having a multibyte char (å) in a column named data_col.
The error
Validations in source (Oracle)
Validations in target (PostgreSQL)
Code changed to fix the problem:
I have added a line before calling the hash function to convert the data to UTF8 (convert function), and also modified the hash call to use that modified source data instead of the original one. This is the code:
Test after the code was changed:
The text was updated successfully, but these errors were encountered: