2

I have sql file with structure:create table,insert into table, contrains, etc.... This script was generated in oracle, and my job is tranform this script into compatible script for postgreSQL.

Does anyone know if can I use ora2pg without installing oracle? For example only with files .sql or oracle dmp? Or I must allways first import sql file into Oracle db and then connect to oracle db in ora2pg config file

Thank you

asked Dec 5, 2016 at 7:06

1 Answer 1

1

DOCUMENTATION

You can use -i:

-i | --input file : File containing Oracle PL/SQL code to convert with
 no Oracle database connection initiated.

Or set INPUT_FILE in ora2pg.conf:

INPUT_FILE

This directive did not control the Oracle database connection or unless it purely disable the use of any Oracle database by accepting a file as argument. Set this directive to a file containing PL/SQL Oracle Code like function, procedure or full package body to prevent Ora2Pg from connecting to an Oracle database and just apply his convertion tool to the content of the file. This can be used with the most of export types: TABLE, TRIGGER, PROCEDURE, VIEW, FUNCTION or PACKAGE, etc.

I did not test this though.

answered Dec 5, 2016 at 14:57
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.