wiki:ReplicateOracle

Replicating KLP from Oracle to Postgres

Install Oracle XE as described in OracleAccess.

Create a tablespace for the KLP data

create tablespace klp datafile '/usr/lib/oracle/xe/oradata/XE/klp_00.dbf' size 2G autoextend on next 100M maxsize 4G;

Create a user to use that tablespace

create user klp identified by <password> default tablespace klp temporary tablespace temp;

Grant privileges to that user

grant create session, create table, create view, create procedure, create sequence, create type to klp;

Give rights to the tablespaces

grant unlimited tablespace to klp;

Import the dump using imp. Prior to importing drop/ truncate existing tables.

imp file=<file> full=yes touser=klp feedback=10000

Drop a bunch of tables that are not required

sqlplus @drop.sql (note: eg_school_classification should not be dropped, remove the line from this drop.sql before you run the script)

Useful Links

http://wiki.oracle.com/page/Oracle+export+and+import+

http://www.orafaq.com/wiki/Import_Export_FAQ

http://stackoverflow.com/questions/128623/disable-all-table-constraints-in-oracle

http://www.dba-oracle.com/t_alter_table_add_constraint_syntax_example.htm

http://michalkuklis.com/blog/2009/05/18/drop-all-tables-in-oracle/

'

Last modified 7 years ago Last modified on 06/29/11 09:28:59

Attachments (2)

Download all attachments as: .zip