Обсуждение: PostgreSQL to Oracle

Поиск
Список
Период
Сортировка

PostgreSQL to Oracle

От
"Ezequias Rodrigues da Rocha"
Дата:
Hi list,

Is it a simple action to convert a database from PostgreSQL to Oracle ?

I mean a simple database with

33 tables
8 functions
31 sequencies
2 triggers
1 type
3 views

Has someone any idea ?

--
Ezequias Rodrigues da Rocha
http://ezequiasrocha.blogspot.com/
use Mozilla Firefox:http://br.mozdev.org/firefox/

Re: PostgreSQL to Oracle

От
Frank Bax
Дата:
At 12:54 PM 3/9/07, Ezequias Rodrigues da Rocha wrote:
>Is it a simple action to convert a database from PostgreSQL to Oracle ?
>
>I mean a simple database with
>
>33 tables
>8 functions
>31 sequencies
>2 triggers
>1 type
>3 views
>
>Has someone any idea ?


Depends on what's actually in the above objects; simple check each one to 
see if Oracle has an equivalent.  Another consideration - do the SQL 
statements in your app adhere to standards? 



Re: PostgreSQL to Oracle

От
"Jonah H. Harris"
Дата:
On 3/9/07, Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com> wrote:
> Is it a simple action to convert a database from PostgreSQL to Oracle ?

Yes, relatively.

> Has someone any idea ?

There's a couple ways to do this, but I'd recommend first using
pg_dump to export schema only.

Your functions and triggers would need to be rewritten, but assuming
they're in PL/pgSQL, it's a fairly trivial task to translate them into
PL/SQL.

As far as the views and sequences are concerned, pull them out of the
pg_dump export and re-run them in TOAD, SQL*Plus, or your favorite
tool.

As far as the type goes, I'm not quite sure what you're doing with it
or how it's used, but it should also be easy to migrate.

To copy the data and table definitions, I'd use a database link (on
the Oracle side) with hsodbc connecting to your PostgreSQL system via
ODBC.

Now that my advice is done with, could you explain why you need to
move to Oracle from PostgreSQL?

--
Jonah H. Harris, Software Architect | phone: 732.331.1324
EnterpriseDB Corporation            | fax: 732.331.1301
33 Wood Ave S, 3rd Floor            | jharris@enterprisedb.com
Iselin, New Jersey 08830            | http://www.enterprisedb.com/

Re: PostgreSQL to Oracle

От
"Ezequias Rodrigues da Rocha"
Дата:
Thank you Jonah,

That isn't a decision taken but I will need to argue with the new team of my new company. I can't see why but I will see how the things occurs.

Thank you again
Ezequias
2007/3/9, Jonah H. Harris <jonah.harris@gmail.com>:
On 3/9/07, Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com> wrote:
> Is it a simple action to convert a database from PostgreSQL to Oracle ?

Yes, relatively.

> Has someone any idea ?

There's a couple ways to do this, but I'd recommend first using
pg_dump to export schema only.

Your functions and triggers would need to be rewritten, but assuming
they're in PL/pgSQL, it's a fairly trivial task to translate them into
PL/SQL.

As far as the views and sequences are concerned, pull them out of the
pg_dump export and re-run them in TOAD, SQL*Plus, or your favorite
tool.

As far as the type goes, I'm not quite sure what you're doing with it
or how it's used, but it should also be easy to migrate.

To copy the data and table definitions, I'd use a database link (on
the Oracle side) with hsodbc connecting to your PostgreSQL system via
ODBC.

Now that my advice is done with, could you explain why you need to
move to Oracle from PostgreSQL?

--
Jonah H. Harris, Software Architect | phone: 732.331.1324
EnterpriseDB Corporation            | fax: 732.331.1301
33 Wood Ave S, 3rd Floor            | jharris@enterprisedb.com
Iselin, New Jersey 08830            | http://www.enterprisedb.com/



--
Ezequias Rodrigues da Rocha
http://ezequiasrocha.blogspot.com/
use Mozilla Firefox:http://br.mozdev.org/firefox/