Ora2Pg - Oracle to PostgreSQL database schema converter

INSTALLATION

All Perl modules can always be found at CPAN (http://search.cpan.org/). Just
type the full name of the module (ex: DBD::Oracle) into the search input box,
it will brings you the page for download.

Releases of Ora2Pg stay at SF.net (https://sourceforge.net/projects/ora2pg/).

Requirement:
------------

You need a modern Perl distribution (perl 5.6 and more), the DBI and DBD::Oracle
Perl modules to be installed. These are used to connect to the Oracle database.
To install DBD::Oracle and have it working you need to have the Oracle client
libraries installed and the ORACLE_HOME environment variable must be defined.

Note that the Oracle and the PostgreSQL databases doesn't need to be on the host
running Ora2Pg but this host must have at least the Oracle client libraries
installed and the PostgreSQL client if you want to use psql or DBD::Pg to import
data.

Optional:
---------

By default Ora2Pg dumps export to flat files, to load them into your PostgreSQL
database you need the PostgreSQL client (psql). If you don't have it on the
host running Ora2Pg you can always transfer these files to a host with the psql
client installed. If you prefer to load export 'on the fly', the perl module
DBD::Pg is required.

Ora2Pg allow to dump all output int a compressed gzip file, to do that you need
the Compress::Zlib Perl module or if you prefer using bzip2 compression, the
program bzip2 must be available in your PATH.

Installing Ora2Pg:
------------------

Like any other Perl Module Ora2Pg can be installed with the following commands:

	tar xzf ora2pg-7.x.tar.gz
	cd ora2pg-7.x/
	perl Makefile.PL
	make && make install

This will install Ora2Pg.pm into your site Perl repository, ora2pg.pl into
/usr/local/bin/ora2pg and ora2pg.conf into /etc/ora2pg/. Note that ora2pg.conf
is automaticaly generated by Makefile.PL

Packaging:
----------

If you want to build binary package for your prefered Linux distribution take a
look at the packaging/ directory of the source tarball. There's everything to
build RPM, Slackware and Debian packages. See README file in that directory.

Usage:
------

By default Ora2Pg will look to ora2pg.conf configuration file into /etc/ora2pg/,
so if the file exist you can simply execute:

	/usr/local/bin/ora2pg

If you want to call an other configuration file, just give the path as command
line argument:

	/usr/local/bin/ora2pg --config /etc/ora2pg/new_ora2pg.conf

Here are all command line parameters available since version 6.0:

Usage: ora2pg [-dhvp] [--option value]

    -d | --debug      : Enable verbose output.
    -h | --help       : Print this short help.
    -v | --version    : Show Ora2Pg Version and exit.
    -c | --conf file  : Used to set an alternate configuration file than the
                        default /etc/or2pg/ora2pg.conf.
    -l | --log   file : Used to set a log file. Default is stdout.
    -o | --out   file : Used to set the path to the output file where SQL will
                        be written. Default: output.sql in running directory.
    -t | --type export: Used to set the export type. It will override the one
                        given in the configuration file (TYPE).
    -p | --plsql      : Enable PLSQL to PLPSQL code conversion.
    -s | --source dsn : Allow to set the Oracle DBI datasource.
    -u | --user user  : Used to set the Oracle database connection user.
    -w | --password pass: Used to set the password of the Oracle database user.
    -n | --namespace schema: Used to set the Oracle schema to extract from.

Previous version do not accept any command line parameter than the path to the
configuration file (/usr/local/bin/ora2pg.pl ora2pg.conf). 


