Thread: Migrating db from Oracle to Postgresql
Hello there We have a few small but critical Oracle databases currently running on a Solaris platform. Is it possible to import the product of an Oracle export, filename.dmp, directly into Postgres? The dmp file is binary not sql text :-( (Looked through faq's and archives) All suggestions most gratefully received Many thanks Colin -- Colin Barnard cgb@dcs.qmul.ac.uk Department of Computer Science, Queen Mary, University of London, Mile End Road, London E1 4NS. Tel: +44 (0)20 7882 5234 Fax: +44 (0)20 8980 6533 And now for something completely off the wall ... |\ |-0 |/ | | / |_/ (Its a hook for hanging a picture on)
On Mon, 19 Nov 2001, Colin Barnard wrote: > Hello there > > We have a few small but critical Oracle databases currently running on a > Solaris platform. Is it possible to import the product of an Oracle > export, filename.dmp, directly into Postgres? The dmp file is binary not > sql text :-( > > (Looked through faq's and archives) > > All suggestions most gratefully received > Many thanks Can't you get the data to an ASCII file? It doesn't have to be with "inserts". A plain ASCII file with some sort of separator between column will do. You then can use the copy command to import your data. I am copying data from Foxpro to PostgreSQL by dumping the data on Foxpro to an ASCII file and having it tab separated (which is the default postgresql expects). The line to import the data would be something like: copy <table> from '<path>' with NULL as ''; The NULL as '' is just so I can import blank columns without problems.
Francisco Reyes wrote: > > > Can't you get the data to an ASCII file? > It doesn't have to be with "inserts". A plain ASCII file with some sort of > separator between column will do. You then can use the copy command to > import your data. Thanks Francisco, Transferring the table data is not a problem, I was hoping to be able to transfer all the other stuff as well, constraints, sequences etc in one hit. If that's not possible I'll have to do it piecemeal. Thanks again Regards Colin -- Colin Barnard cgb@dcs.qmul.ac.uk Department of Computer Science, Queen Mary, University of London, Mile End Road, London E1 4NS. Tel: +44 (0)20 7882 5234 Fax: +44 (0)20 8980 6533 And now for something completely off the wall ... |\ |-0 |/ | | / |_/ (Its a hook for hanging a picture on)