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
991 stars 342 forks source link

Sequences referenced as indexes in grants.sql #1604

Closed EParisot closed 1 year ago

EParisot commented 1 year ago

Hi ! First let me thank you for this awesome tool, really usefull ! I just had 2 issues with my grant.sql :

First, it added users creation lines on top of file, it breaks the migration flow because they already exists... This is a minor issue, I just commented the corresponding lines...

Second problem is I found 3 blocs corresponding to INDEXES instead of SEQUENCES :

ALTER INDEX table1.rubric_pk_seq OWNER TO user1;
GRANT ALL ON  table1.rubric_pk_seq TO user1;
REVOKE ALL ON table1.rubric_pk_seq FROM PUBLIC;
GRANT SELECT ON table1.rubric_pk_seq TO user1;

I had to update it by hand. I ansolutely dont know why it happened...

Again thanks for this excellent tool !

darold commented 1 year ago

Hi,

This problem might have been fixed, I can not reproduce the issue. Here the kind of result I have with current code:

-- Set priviledge on SEQUENCE EMPLOYEES_SEQ
ALTER SEQUENCE hr.employees_seq OWNER TO hr;
GRANT ALL ON SEQUENCE hr.employees_seq TO hr;
REVOKE ALL ON SEQUENCE hr.employees_seq FROM PUBLIC;
GRANT SELECT ON SEQUENCE hr.employees_seq TO scott;
EParisot commented 11 months ago

I'm sorry to inform you that this issue is still present... No idea where it comes from... but my grants.sql are still broken with v24 Ora2Pg seems to recognize those Sequences as Indices