<chapter id="ora2pgpro-features">
<title>Features</title>

    <para>
      <application>ora2pgpro</application> consists of a Perl script
      <filename>ora2pgpro</filename> and a Perl module
      <filename>Ora2PgPro.pm</filename>, the only thing you
      have to modify is the configuration file <filename>ora2pgpro.conf</filename>
      by setting the DSN to the Oracle database and
      optionally the name of a schema. Once that is done you just have to
      set the type of export you want: <literal>TABLE</literal> with
      constraints, <literal>VIEW</literal>, <literal>MVIEW</literal>,
      <literal>TABLESPACE</literal>, <literal>SEQUENCE</literal>,
      <literal>INDEXES</literal>, <literal>TRIGGER</literal>,
      <literal>GRANT</literal>, <literal>FUNCTION</literal>,
      <literal>PROCEDURE</literal>, <literal>PACKAGE</literal>,
      <literal>PARTITION</literal>, <literal>TYPE</literal>,
      <literal>INSERT</literal> or <literal>COPY</literal>,
      <literal>FDW</literal>, <literal>QUERY</literal>,
      <literal>SYNONYM</literal>.
    </para>
    <para>
      By default, <application>ora2pgpro</application> exports to a file
      that you can load into Postgres Pro
      with the <application>psql</application> client, but you can also
      import directly into a Postgres Pro database
      by setting its DSN into the configuration file.
      With all configuration options of <filename>ora2pgpro.conf</filename>,
      you have full control of what should be exported and how.
      The following features are included:
    </para>
    <itemizedlist spacing="compact">
      <listitem><simpara>
        Export full database schema (tables, views, sequences, indexes), with
        unique, primary, foreign key, and check constraints.
      </simpara></listitem>
      <listitem><simpara>
        Export grants/privileges for users and groups.
      </simpara></listitem>
      <listitem><simpara>
        Export range/list partitions and subpartitions.
      </simpara></listitem>
      <listitem><simpara>
        Export a table selection (by specifying the table names).
      </simpara></listitem>
      <listitem><simpara>
        Export Oracle schema to
        a Postgres Pro schema.
      </simpara></listitem>
      <listitem><simpara>
        Export predefined functions, triggers, procedures, packages, and
        package bodies.
      </simpara></listitem>
      <listitem><simpara>
        Export full data or following a <literal>WHERE</literal> clause.
      </simpara></listitem>
      <listitem><simpara>
        Full support of Oracle BLOB objects as
        Postgres Pro <type>bytea</type>.
      </simpara></listitem>
      <listitem><simpara>
        Export Oracle views as Postgres Pro tables.
      </simpara></listitem>
      <listitem><simpara>
        Export Oracle user-defined types.
      </simpara></listitem>
      <listitem><simpara>
        Provide some basic automatic conversion of
        <application>PL/SQL</application> code to <application>PL/pgSQL</application>.
      </simpara></listitem>
      <listitem><simpara>
        Works on any platform.
      </simpara></listitem>
      <listitem><simpara>
        Export Oracle tables as foreign data wrapper tables.
      </simpara></listitem>
      <listitem><simpara>
        Export materialized views.
      </simpara></listitem>
      <listitem><simpara>
        Show a report of an Oracle database content.
      </simpara></listitem>
      <listitem><simpara>
        Assistance in migration cost assessment of an Oracle database.
      </simpara></listitem>
      <listitem><simpara>
        Assistance in migration difficulty level assessment of an Oracle database.
      </simpara></listitem>
      <listitem><simpara>
        Assistance in migration cost assessment of <application>PL/SQL</application> code from a file.
      </simpara></listitem>
      <listitem><simpara>
        Assistance in migration cost assessment of Oracle
        SQL queries stored in a file.
      </simpara></listitem>
      <listitem><simpara>
        Export Oracle locator and spatial
        geometries into <application>PostGIS</application>.
      </simpara></listitem>
      <listitem><simpara>
        Export <literal>DBLINK</literal> as Oracle FDW.
      </simpara></listitem>
      <listitem><simpara>
        Export <literal>SYNONYM</literal>s as views.
      </simpara></listitem>
      <listitem><simpara>
        Export <literal>DIRECTORY</literal> as external table or directory
        for <literal>external_file</literal> extension.
      </simpara></listitem>
      <listitem><simpara>
        Dispatch a list of SQL orders over multiple
        Postgres Pro connections.
      </simpara></listitem>
      <listitem><simpara>
        Perform a diff between Oracle
        and Postgres Pro database for test purposes.
      </simpara></listitem>
      <listitem><simpara>
        Full support of Oracle packages as Postgres Pro packages.
      </simpara></listitem>
      <listitem><simpara>
        Export <type>VARRAY</type> as Postgres Pro arrays.
      </simpara></listitem>
      <listitem><simpara>
        Export associative arrays as collections of
        <ulink url="https://postgrespro.com/docs/enterprise/16/pg-variables"><application>pg_variables</application></ulink>.
      </simpara></listitem>
    </itemizedlist>
    <para>
      <application>ora2pgpro</application> does its best to convert
      your Oracle database to
      Postgres Pro automatically, but there
      is still manual work to do. The Oracle-specific
      <application>PL/SQL</application> code generated for functions,
      procedures, packages, and triggers has to be reviewed to match
      the Postgres Pro syntax. You can
      find some useful recommendations on porting
      Oracle <application>PL/SQL</application>
      code to Postgres Pro
      <application>PL/pgSQL</application> in
      <ulink url="https://postgrespro.com/docs/enterprise/15/plpgsql-porting">Porting from Oracle PL/SQL</ulink>
      and <ulink url="https://postgrespro.com/docs/enterprise/15/pgpro-migration-tools">Migration Tools in Postgres Pro</ulink>.
    </para>
</chapter>
