请问ora2pg如何使用,如何将oracle数据库中的函数,表,存储过程,数据,触发器等移植到postgresql里呢

现在只能生成建表语句,使用的是ora2pg -p命令,怎么才能生成其他的sql文呢?

高版本PG可以用oracle_fdw来做,类似DBLINK,很方便。也可以用oracle的spool导出,然后用Postgres的COPY导入,速度也较快。
温馨提示:内容为网友见解,仅供参考
第1个回答  推荐于2016-08-05
TYPE
Here are the different type of export allowed, default is TABLE:
TABLE: Extract all tables with indexes, primary keys, unique keys, foreign keys and check constraints.

VIEW: Extract only views.

GRANT: Extract roles converted to Pg groups, users and grants on all objects.

SEQUENCE: Extract all sequence and their last position.

TABLESPACE: Extract storage space, need PostgreSQL >= v8.

TRIGGER: Extract triggers defined following actions.

FUNCTION: Extract functions.

PROCEDURES: Extract procedures.

PACKAGE: Extract packages and package bodies.

DATA: Extract datas as INSERT statement.

COPY: Extract datas as COPY statement.

PARTITION: Extract range and list partitioning.

TYPE: Extract Oracle user defined type.

FDW: Export Oracle tables as foreign table for oracle_fdw.
Only one type of export can be perform at the same time so the TYPE directive must be unique. If you have more than one only the last found in the configuration file will be registered.本回答被提问者采纳
第2个回答  2012-07-17
参加活动,送钥匙。
第3个回答  2012-07-19
导出导入操作。。。
相似回答