Commit e6917b12 authored by Peter Eisentraut's avatar Peter Eisentraut

Remove ora2pg; now available at <http://www.samse.fr/GPL/ora2pg/>.

parent 305c82e6
# $PostgreSQL: pgsql/contrib/Makefile,v 1.62 2006/02/12 03:55:52 momjian Exp $ # $PostgreSQL: pgsql/contrib/Makefile,v 1.63 2006/02/25 19:18:58 petere Exp $
subdir = contrib subdir = contrib
top_builddir = .. top_builddir = ..
...@@ -38,7 +38,6 @@ WANTED_DIRS = \ ...@@ -38,7 +38,6 @@ WANTED_DIRS = \
# adddepend \ (does not have a makefile) # adddepend \ (does not have a makefile)
# mSQL-interface \ (requires msql installed) # mSQL-interface \ (requires msql installed)
# mac \ (does not have a makefile) # mac \ (does not have a makefile)
# oracle \ (does not have a makefile)
# start-scripts \ (does not have a makefile) # start-scripts \ (does not have a makefile)
# xml2 \ (requires libxml installed) # xml2 \ (requires libxml installed)
......
...@@ -98,10 +98,6 @@ oid2name - ...@@ -98,10 +98,6 @@ oid2name -
Maps numeric files to table names Maps numeric files to table names
by B Palmer <bpalmer@crimelabs.net> by B Palmer <bpalmer@crimelabs.net>
oracle -
Converts Oracle database schema to PostgreSQL
by Gilles Darold <gilles@darold.net>
pg_buffercache - pg_buffercache -
Real time queries on the shared buffer cache Real time queries on the shared buffer cache
by Mark Kirkwood <markir@paradise.net.nz> by Mark Kirkwood <markir@paradise.net.nz>
......
2001 05 09 - Initial version 1.0
2001 05 09 - Version 1.1
- 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=>'VIEW'
- Add indexes extraction on tables.
- Changes name of constraints, default is now used.
- Add debug printing to see that the process is running :-)
- Add extraction of only required tablename.
- Add extraction of only n to n table indice. Indices of extraction can be obtained
with the option showtableid set to 1.
- Fix print of NOT NULL field.
- 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'
2001 06 27 - Version 1.4
- Add online Oracle data extraction and insertion into PG database.
- Data export as insert statement (type => DATA)
- Data export as copy from stdin statement (type => COPY)
2001 12 28 - Version 1.5
- Fix LongReadLen problem when exporting Oracle data on LONG and LOB types
Thanks to Stephane Schildknecht for reporting and testing the fix.
- Add more precision on NUMBER type conversion
- Add conversion of type LONG, LOB, FILE
- Fix a problem when extracting data, sometime table could need to be prefixed
by the schema name.
- Fix output of Oracle data extraction. It now require a call to the function
export_data().
2002 01 07 - Version 1.6
- Fix problem exporting NULL value. Thanks to Stephane Schildknecht.
2002 02 14 - Version 1.7
- Remove export of OUTLINE object type. Thanks to Jean-Paul ARGUDO.
2002 03 05 - Version 1.8
- Add Oracle type FLOAT conversion to float8.
- Add column alias extraction on view. Thanks to Jean-Francois RIPOUTEAU
- Add PACKAGE extraction (type => DATA).
2002 06 04 - Version 1.9
- Fix a problem export data which fill NULL instead of 0 or empty string.
Thanks to Jan Kester.
- Add time with date when export data [ tochar('YYYY-MM-DD HH24:MI:SS') ].
Thanks to Paolo Mattioli.
2002 07 29 - Version 1.10
- Fix a problem with local settings regarding decimal separator (all ,
are changed to .) Thank to Jan Kester.
2002 09 27 - Version 1.11
- Fix a problem when retrieving package+package body. Thanks to Mike WILHELM-HILTZ
- Set LongReadLen to 100000 when exporting table information. Many users reports
this kind of error: A-01406 LongReadLen too small and/or LongTruncOk not set
This should fix the problem else you must increase the value (around line 422 of Ora2Pg.pm.
- Filtering by owner for better performance when retreiving database schema. Thanks to Jefferson MEDEIROS
2002 12 03 - Version 1.12
I have fixed 2 bugs when using it against Oracle 817R3 on linux.
- Fix problem regarding RI constraints, the owner name was not
getting into the sql statement. Thank to Ian Boston.
- Moved all the RI constraints out of the create table statement.
Thank to Ian Boston for this contribution. This was a major request
from Ora2pg users.
2002 12 26 - Version 2.0
- Clean code.
- Fix COPY output on column value with end of line and add column naming.
- Add support to the PostgreSQL 7.3 schema. So Oracle schema can now be exported.
(see export_schema init option)
- Remove data extraction limit (old default: 10) so each tuple will be dump by default.
Thanks for all congratulation message and bug report+fix I received.
Gilles DAROLD <gilles@darold.net>
This diff is collapsed.
This diff is collapsed.
The following need your contribution :
- SQL queries converter.
- PL/SQL code converter.
This diff is collapsed.
#!/usr/bin/perl
#------------------------------------------------------------------------------
# Project : Oracle to Postgresql converter
# Name : ora2pg.pl
# Language : perl, v5.6.1
# OS : linux RedHat 7.3 kernel 2.4.18-17.7.xsmp
# Author : Gilles Darold, gilles@darold.net
# Copyright: Copyright (c) 2000-2002 : Gilles Darold - All rights reserved -
# Function : Script used to convert Oracle Database to PostgreSQL
#------------------------------------------------------------------------------
# Version : 2.0
#------------------------------------------------------------------------------
BEGIN {
$ENV{ORACLE_HOME} = '/usr/local/oracle/oracle816';
}
use strict;
use Ora2Pg;
# Initialyze the database connection
my $dbsrc = 'dbi:Oracle:host=localhost;sid=TEST';
my $dbuser = 'system';
my $dbpwd = 'manager';
# Create an instance of the Ora2Pg perl module
my $schema = new Ora2Pg (
datasource => $dbsrc, # Database DBD datasource
user => $dbuser, # Database user
password => $dbpwd, # Database password
debug => 1, # Verbose mode
# export_schema => 1, # Export Oracle schema to Postgresql 7.3 schema
# schema => 'APPS', # Extract only the given schema namespace
type => 'TABLE', # Extract table
# type => 'PACKAGE', # Extract PACKAGE information
# type => 'DATA', # Extract data with output as INSERT statement
# type => 'COPY', # Extract data with output as COPY statement
# type => 'VIEW', # Extract views
# type => 'GRANT', # Extract privileges
# type => 'SEQUENCE', # Extract sequences
# type => 'TRIGGER', # Extract triggers
# type => 'FUNCTION', # Extract functions
# type => 'PROCEDURE', # Extract procedures
# 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 3
# max => 10, # Extract ended at indice 5
# data_limit => 1000, # Extract all data by dump of 1000 tuples
# data_limit => 0, # Extract all data in one pass. Be sure to have enougth memory.
);
# Just export data of the following fields from table 's_txcot'
#$schema->modify_struct('s_txcot','dossier', 'rub', 'datapp');
#### Function to use for extraction when type option is set to DATA or COPY
# Send exported data directly to a PostgreSQL database
#$schema->send_to_pgdb('dbi:Pg:dbname=test_db;host=localhost;port=5432','test','test');
# Output the data extracted from Oracle DB to a file or to STDOUT if no argument.
#$schema->export_data("output.sql");
#### Function to use for extraction of other type
# Create the POSTGRESQL representation of all objects in the database
$schema->export_schema("output.sql");
exit(0);
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