From: Chris Mair <chris@1006.org>
To: PAWAN SHARMA <er.pawanshr0963@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Oracle to PostgreSQL Migration.
Date: Mon, 29 May 2017 14:58:54 +0200
Message-ID: <85c78636081d539aa0cfdd8380c37d52@smtp.hushmail.com> (raw)
In-Reply-To: <CAPgXFMQV0bFRu5tm0HF7yU1VLFrRpKKO5xcN8yaicHAWqfaavg@mail.gmail.com>
References: <CAPgXFMSJOLOz+tm+jzkh9GvEpQMUnYWCNPq7RDCmobVKS-BHzg@mail.gmail.com>
<342051cfd508755a032d133ed0ab666e@smtp.hushmail.com>
<CAPgXFMQV0bFRu5tm0HF7yU1VLFrRpKKO5xcN8yaicHAWqfaavg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>
> C:\ora2pg>ora2pg -c ora2pg.conf
> [========================>] 2/2 tables (100.0%) end of scanning.
> [> ] 0/2 tables (0.0%) end of scanning.
> [========================>] 2/2 tables (100.0%) end of table export.
Looks good so far.
This means you could connect to Oracle DB now.
> DBD::Pg::st execute failed: ERROR: relation "mytab" does not exist
This is coming from the Postgres side.
In ora2pg.conf go to the section
OUTPUT SECTION (Control output to file or PostgreSQL database)
I suggest you comment out (prefix with #) the part
#PG_DSN dbi:Pg:dbname=test_db;host=localhost;port=5432
#PG_USER test
#PG_PWD test
and just have ora2pg write its ouput to a file by setting OUTPUT like this:
OUTPUT output.sql
This way you have your oputput for Postgres in a file that you can check out
and try importing step by step. I guess you are running this on some test
data, so the file will be small enough to open it with an editor.
You cap paste piece by piece into a Postgres prompt (psql or pgadmin or whatever
you're using).
You can then see at what point you get an error (and hopefully understand
what's happening).
Bye,
Chris.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: chris@1006.org, er.pawanshr0963@gmail.com
Subject: Re: Oracle to PostgreSQL Migration.
In-Reply-To: <85c78636081d539aa0cfdd8380c37d52@smtp.hushmail.com>
References: <CAPgXFMSJOLOz+tm+jzkh9GvEpQMUnYWCNPq7RDCmobVKS-BHzg@mail.gmail.com> <342051cfd508755a032d133ed0ab666e@smtp.hushmail.com> <CAPgXFMQV0bFRu5tm0HF7yU1VLFrRpKKO5xcN8yaicHAWqfaavg@mail.gmail.com> <85c78636081d539aa0cfdd8380c37d52@smtp.hushmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox