Ora2Pg is a free tool used to migrate an Oracle database to a PostgreSQL compatible schema. It connects your Oracle database, scan it automatically and extracts its structure or data, it then generates SQL scripts that you can load into PostgreSQL.
Hi,
I'm working on migration of Oracle database to PostgreSQL using ora2pg on Windows server environnement.
I want to copy a table "COMPTE" with 4 hash partitions "SYS_P421", "SYS_P422","SYS_P423" and "SYSP424" using the following command:
c:\ set TABLE=COMPTE
c:\ ora2pg -p -t COPY -a "%TABLE%" -o data%TABLE%.sql -b E:\ora2pg\mig\EDM\data\saad -c E:\ora2pg\mig\EDM\config\ora2pg_saad.conf
After the command is end, I have these files created in "E:\ora2pg\mig\EDM\data\saad" directory:
COMPTE_data_COMPTE.sql
COMPTE_SYS_P421_data_COMPTE.sql
COMPTE_SYS_P422_data_COMPTE.sql
COMPTE_SYS_P423_data_COMPTE.sql
COMPTE_SYS_P424_data_COMPTE.sql
data_COMPTE.sql
Below the content of "data_COMPTE.sql" file:
SET search_path = edc2_owner,public;
BEGIN;
ALTER TABLE compte DISABLE TRIGGER USER;
My question is:
How ora2pg generate files names ?
Because there is mismatch between the file name containing data and the file name in "data_COMPTE.sql" file
example:
COMPTE_SYS_P421_data_COMPTE.sql vs \i 'E:\ora2pg\mig\EDM\data\saad/SYS_P421_data_COMPTE.sql'
Hi, I'm working on migration of Oracle database to PostgreSQL using ora2pg on Windows server environnement. I want to copy a table "COMPTE" with 4 hash partitions "SYS_P421", "SYS_P422","SYS_P423" and "SYSP424" using the following command: c:\ set TABLE=COMPTE c:\ ora2pg -p -t COPY -a "%TABLE%" -o data%TABLE%.sql -b E:\ora2pg\mig\EDM\data\saad -c E:\ora2pg\mig\EDM\config\ora2pg_saad.conf After the command is end, I have these files created in "E:\ora2pg\mig\EDM\data\saad" directory: COMPTE_data_COMPTE.sql COMPTE_SYS_P421_data_COMPTE.sql COMPTE_SYS_P422_data_COMPTE.sql COMPTE_SYS_P423_data_COMPTE.sql COMPTE_SYS_P424_data_COMPTE.sql data_COMPTE.sql
Below the content of "data_COMPTE.sql" file:
SET search_path = edc2_owner,public; BEGIN; ALTER TABLE compte DISABLE TRIGGER USER;
\i 'E:\ora2pg\mig\EDM\data\saad/COMPTE_data_COMPTE.sql' \i 'E:\ora2pg\mig\EDM\data\saad/SYS_P421_data_COMPTE.sql' \i 'E:\ora2pg\mig\EDM\data\saad/SYS_P422_data_COMPTE.sql' \i 'E:\ora2pg\mig\EDM\data\saad/SYS_P423_data_COMPTE.sql' \i 'E:\ora2pg\mig\EDM\data\saad/SYS_P424_data_COMPTE.sql'
ALTER TABLE compte ENABLE TRIGGER USER; COMMIT;
My question is: How ora2pg generate files names ? Because there is mismatch between the file name containing data and the file name in "data_COMPTE.sql" file
example: COMPTE_SYS_P421_data_COMPTE.sql vs \i 'E:\ora2pg\mig\EDM\data\saad/SYS_P421_data_COMPTE.sql'
Could someone help me? Saad