darold / ora2pg

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.
http://www.ora2pg.com/
GNU General Public License v3.0
1.02k stars 343 forks source link

Export table structure (without constraints, indexes, PK, FK) #1582

Closed tayalarun1 closed 1 year ago

tayalarun1 commented 1 year ago

Hello Darold,

Hope you are doing good. I have got a task to migrate big of Oracle 19c database to PostgreSQL. According to my experience with Oracle, if we do import of data to a table with just the structure (without constraints, indexes, PK, FK), importing is faster as compared to table with all constraints, etc.

Is there a way in Ora2pg, I export table structure in a file & all others (constraints, indexes, PK, FK) in separate file? I will import the structure then data & then all others (constraints, indexes, PK, FK). This will help me to reduce the manual work of dropping all these before the importing of data & then adding after data import is complete.

Thanks Arun

darold commented 1 year ago

Yes, you just have to enable FILE_PER_CONSTRAINT, FILE_PER_INDEX and FILE_PER_FKEYS