Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Ian Doob Technology
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Ora2pg
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== Important Parameters ==== <pre> # Set the Oracle home directory ORACLE_HOME /home/ian/oracle/instantclient_23_7 # Set Oracle database connection (datasource, user, password) ORACLE_DSN dbi:Oracle:host=localhost;service_name=XEPDB1;port=1523 ORACLE_USER system ORACLE_PWD ipswich # Export Oracle schema to PostgreSQL schema EXPORT_SCHEMA 1 # Oracle schema/owner to use SCHEMA HR # Enable/disable the CREATE SCHEMA SQL order at starting of the output file. # It is enable by default and concern on TABLE export type. CREATE_SCHEMA 1 COMPILE_SCHEMA 1 # Type of export. Values can be the following keyword: # TABLE Export tables, constraints, indexes, ... # PACKAGE Export packages # INSERT Export data from table as INSERT statement # COPY Export data from table as COPY statement # VIEW Export views # GRANT Export grants # SEQUENCE Export sequences # TRIGGER Export triggers # FUNCTION Export functions # PROCEDURE Export procedures # TABLESPACE Export tablespace (PostgreSQL >= 8 only) # TYPE Export user defined Oracle types # PARTITION Export range or list partition (PostgreSQL >= v8.4) # FDW Export table as foreign data wrapper tables # MVIEW Export materialized view as snapshot refresh view # QUERY Convert Oracle SQL queries from a file. # KETTLE Generate XML ktr template files to be used by Kettle. # DBLINK Generate oracle foreign data wrapper server to use as dblink. # SYNONYM Export Oracle's synonyms as views on other schema's objects. # DIRECTORY Export Oracle's directories as external_file extension objects. # LOAD Dispatch a list of queries over multiple PostgreSQl connections. # TEST perform a diff between Oracle and PostgreSQL database. # TEST_COUNT perform only a row count between Oracle and PostgreSQL tables. # TEST_VIEW perform a count on both side of number of rows returned by views # TEST_DATA perform data validation check on rows at both sides. # SEQUENCE_VALUES export DDL to set the last values of sequences TYPE TABLE # Define the following directive to send export directly to a PostgreSQL # database, this will disable file output. Note that these directives are only # used for data export, other export need to be imported manually through the # use of psql or any other PostgreSQL client. PG_DSN dbi:Pg:dbname=postgres;host=host.docker.internal;port=5433 PG_USER postgres PG_PWD ipswich # By default all output is dump to STDOUT if not send directly to postgresql # database (see above). Give a filename to save export to it. If you want # a Gzip'd compressed file just add the extension .gz to the filename (you # need perl module Compress::Zlib from CPAN). Add extension .bz2 to use Bzip2 # compression. OUTPUT output.sql # Base directory where all dumped files must be written OUTPUT_DIR /home/ian/tmp # Enable PLSQL to PLPSQL conversion. This is a work in progress, feel # free modify/add you own code and send me patches. The code is under # function plsql_toplpgsql in Ora2PG/PLSQL.pm. Default enabled. PLSQL_PGSQL 1 # If you want to use functions defined in the Orafce library and prevent # Ora2Pg to translate call to these function, enable this directive. # The Orafce library can be found here: https://github.com/orafce/orafce # By default Ora2pg rewrite add_month(), add_year(), date_trunc() and # to_char() functions, but you may prefer to use the orafce version of # these function that do not need any code transformation. USE_ORAFCE 0 # By default when using SHOW_REPORT the migration report is generated as # simple text, enabling this directive will force ora2pg to create a report # in HTML format. DUMP_AS_HTML 0 # Set the PostgreSQL major version number of the target database. Ex: 9.6 or 10 # Default is current major version at time of a new release. This replace the # old PG_SUPPORTS_* configuration directives. PG_VERSION 17 </pre>
Summary:
Please note that all contributions to Ian Doob Technology may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
My wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width