我试图从oracle迁移一个简单的模式,其中包含表和行,触发器和序列到PostgreSQL . 所有这些都成功迁移ora2pg . 以下是该过程的进展:

[root@localhost ora2pg]# ora2pg
[=========>               ] 2/5 tables (40.0%) scanning table EMPLOYEE_AUDIT_INS[==============>          ] 3/5 tables (60.0%) scanning table EMPLOYEE_AUDIT_INS[===================>     ] 4/5 tables (80.0%) scanning table EMPLOYEE_AUDIT_UPD[========================>] 5/5 tables (100.0%) scanning table TEST_SEQUENCE    [========================>] 5/5 tables (100.0%) end of scanning.            
[====>                    ] 1/5 tables (20.0%) scanning table EMPLOYEE_AUDIT_INS[====>                    ] 1/5 tables (20.0%) scanning table EMPLOYEE_AUDIT_INS[====>                    ] 1/5 tables (20.0%) scanning table EMPLOYEE_AUDIT_UPD[====>                    ] 1/5 tables (20.0%) scanning table TEST_SEQUENCE     [>                        ] 0/5 tables (0.0%) end of scanning.             
[===================>     ] 4/5 tables (80.0%) exporting EMPLOYEE_AUDIT_INSERT_S[========================>] 5/5 tables (100.0%) exporting EMPLOYEES             [========================>] 5/5 tables (100.0%) end of table export.
[========================>] 0/0 packages (100.0%) end of output.    
[========================>] 4/4 rows (100.0%) Table EMPLOYEES (4 recs/sec)
[======>                  ]  4/14 total rows (28.6%) - (0 sec., avg: 4 recs/sec).
[======>                  ]  4/14 rows (28.6%) on total estimated data (1 sec., [========================>] 4/4 rows (100.0%) Table EMPLOYEE_AUDIT_INSERT (4 recs/sec)          
[=============>           ]  8/14 total rows (57.1%) - (0 sec., avg: 8 recs/sec).     
[=============>           ]  8/14 rows (57.1%) on total estimated data (1 sec., [========================>] 4/4 rows (100.0%) Table EMPLOYEE_AUDIT_INSERT_SIMPLE (4 recs/sec)   
[====================>    ] 12/14 total rows (85.7%) - (0 sec., avg: 12 recs/sec).           
[====================>    ] 12/14 rows (85.7%) on total estimated data (1 sec., [========================>] 0/0 rows (100.0%) Table EMPLOYEE_AUDIT_UPDATE (0 recs/sec)           
[====================>    ] 12/14 total rows (85.7%) - (0 sec., avg: 12 recs/sec).    
[====================>    ] 12/14 rows (85.7%) on total estimated data (1 sec., [========================>] 2/2 rows (100.0%) Table TEST_SEQUENCE (2 recs/sec)                   
[========================>] 14/14 total rows (100.0%) - (0 sec., avg: 14 recs/sec).
[========================>] 14/14 rows (100.0%) on total estimated data (1 sec., avg: 14 recs/sec)
[========================>] 0/0 views (100.0%) end of output.                                     
[========================>] 1/1 sequences (100.0%) end of output.      
[========================>] 2/2 triggers (100.0%) end of output.            
[========================>] 0/0 functions (100.0%) end of functions export.
[========================>] 0/0 procedures (100.0%) end of procedures export.
[========================>] 0/0 types (100.0%) end of output.                
[========================>] 0/0 partitions (100.0%) end of output.

当我尝试使用psql执行.sql文件时,结果始终显示只能创建序列:

abcdtest=# \i /etc/ora2pg/schema_abcd_with_2triggers_1sequence/abcd_schema__usergrant0_insertconfig_fileperfunction1_disablesequence0.sql 
...
psql.bin:/etc/ora2pg/schema_abcd_with_2triggers_1sequence/abcd_schema__usergrant0_insertconfig_fileperfunction1_disablesequence0.sql:88: NOTICE:  relation "numbering" does not exist, skipping
ALTER SEQUENCE
COMMIT

其他一切都很好 . 我检查了.sql文件,唯一包含序列的行只是改变序列,而不是创建它:

ALTER SEQUENCE IF EXISTS numbering RESTART WITH 3;
COMMIT;

我在这做错了什么?我该怎么做才能从oracle迁移序列?提前致谢!