Commit 2e2d17ed authored by Bruce Momjian's avatar Bruce Momjian

Here the latest version and first working release of Ora2Pg a tool to export

Oracle database to PostgreSQL.

    It currently dump the database schema (tables, views, sequences,
    indexes, grants), with primary, unique and foreign keys into PostgreSQL
    syntax without editing the SQL code generated. You can dump only a
    particular schema from the Oracle database.

    Functions, procedures and triggers with SQL or PLSQL code generated must
    be reviewed to match the PostgreSQL syntax. Some usefull recommandation
    on porting Oracle to PostgreSQL can be found at
http://techdocs.postgresql.org/
    under the "Converting from other Databases to PostgreSQL" Oracle part. I
just
    notice one thing more is that the trunc() function in Oracle is the same for
number
    or date so be carefull when porting to PostgreSQL to use trunc() for number
and
    date_trunc() for date.

I will add more precision in type NUMBER conversion based on length to match
as closest as possible all rich PostgreSQL numerics type. But it seems not to be

urgent as it seems that Oracle DBAs only create number with length 22 (default)
Space seems not to be their problem...

Gilles DAROLD
parent a0c12d5e
......@@ -4,7 +4,7 @@
- Add table grant extraction based on group. Oracle ROLES are groups in PG
2001 05 11 - Version 1.2
- Views extraction is now really done with the option type=>'VIEWS'
- Views extraction is now really done with the option type=>'VIEW'
- Add indexes extraction on tables.
- Changes name of constraints, default is now used.
- Add debug printing to see that the process is running :-)
......@@ -15,3 +15,13 @@
- Complete rewrite of the grant extraction
- Complete rewrite of most things
2001 06 20 - Version 1.3
- Grant/privilege extraction are now done separatly with the option type=>'GRANT'
- Sequence extraction with the option type=>'SEQUENCE'
- Trigger extraction with the option type=>'TRIGGER'
- Function extraction with the option type=>'FUNCTION' and type=>'PROCEDURE'
- Complete rewrite of the foreign key extraction
- Fix incorrect type translation and many other bug fix
- Add schema only extraction by option schema => 'MYSCHEM'
This diff is collapsed.
This diff is collapsed.
- Extract sequences on tables. Seem to be difficult, can't find the way to link
a sequence with one or more column. So problably just dump and edit manually
- More precision in type conversion based on length (I've no good DB to do that)
- Extract triggers and internal function.
- Extract datas.
- SQL queries converter.
Here are some more thing to do :
- More precision in type conversion based on length
(I've no good DB to do that)
This will be done as soon as possible
The following need your help :
- Extracting/converting datas.
- SQL queries converter.
- PL/SQL code converter.
This diff is collapsed.
......@@ -30,11 +30,22 @@ my $schema = new Ora2Pg (
user => $dbuser, # Database user
password => $dbpwd, # Database password
debug => 1, # Verbose mode
schema => 'APPS', # Extract only APPS schema
type => 'TABLE', # Extract table
# type => 'VIEW', # Extract views
# tables => [('MY_TABLE1','MY_TABLE2')], # Extract only these table
# type => 'GRANT', # Extract privileges
# type => 'SEQUENCE', # Extract sequences
# type => 'TRIGGER', # Extract triggers
# type => 'FUNCTION', # Extract functions
# type => 'PROCEDURE', # Extract procedures
# tables => [('FND_USER_PREFERENCES')], # unique index + users
# tables => [('CUSTOMER_DATA')], # Unique and primary key
# tables => [('TX_DATA')], # simple indexes
# tables => [('NDW_BROWSER_ATTRIBUTES')], # view
# tables => [('TRIP_DATA')], # Foreign key
# showtableid => 1, # Display only table indice during extraction
# min => 1, # Extract begin at indice 1
# max => 10 # Extract ended at indice 10
# min => 1, # Extract begin at indice 3
# max => 10 # Extract ended at indice 5
);
# Create the POSTGRESQL representation of all objects in the database
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment