Re: import tablespaces from oracle to postgres

From: Shreeyansh Dba <shreeyansh2014(at)gmail(dot)com>
To: Pepe TD Vo <pepevo(at)yahoo(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: import tablespaces from oracle to postgres
Date: 2019-01-29 14:36:57
Message-ID: CAGDYbUO2cDHgMDfH2iqyKQ1ze4eYopQSdE5erx_NtnLYox_CGA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Pepe,

Yes, you can create the tablespaces manually just by changing your
tablespace name along with the location.

Also, you can use the existing tablespace at the time of importing into the
Postgres.

Thanks & Regards,
*Shreeyansh DBA Team*
www.shreeyansh.com

On Tue, Jan 29, 2019 at 7:37 PM Pepe TD Vo <pepevo(at)yahoo(dot)com> wrote:

> Hi experts,
>
> I am using Ora2pg to export cidr in oracle to postgres. When the export
> Tablespace.sql is done, I import into the Postgres, Cidr. I get ERROR below
>
> $psql -U posgres -d CIDR < TABLESPACE_cidrdba.sql
> SET
> CREATE TABLESPACE
> ERROR: directory"/opt/postgres11/data/cidr/PG_11_201809051" already in use
> as a tablespace.
>
> even trying to create tablespace manually still said it's already in use,
> but PG_11_20109051 is belong to cidr_data tablespace, how can I create new
> tablespaces for cidr postgres db?
>
>
> $psql -U posgres -d CIDR
> $psql> create tablespace cidr_lg location 'opt/postgres11/data/cidr';
> SET
> CREATE TABLESPACE
> ERROR: directory"/opt/postgres11/data/cidr/PG_11_201809051" already in use
> as a tablespace.
>
> $psql> create tablespace cidr_dg location 'opt/postgres11/data/cidr';SET
> CREATE TABLESPACE
> ERROR: directory"/opt/postgres11/data/cidr/PG_11_201809051" already in use
> as a tablespace.
>
> how can I create new tablespaces for cidr postgres db?
> v/r,
>
>
>
> *Bach-Nga*No one in this world is pure and perfect. If you avoid people
> for their mistakes you will be alone. So judge less, love and forgive more.
> To call him a dog hardly seems to do him justice though in as much as he
> had four legs, a tail, and barked, I admit he was, to all outward
> appearances. But to those who knew him well, he was a perfect gentleman
> (Hermione Gingold)
>
> **Live simply **Love generously **Care deeply **Speak kindly.
> *** Genuinely rich *** Faithful talent *** Sharing success
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Pepe TD Vo 2019-01-29 14:44:05 Re: import tablespaces from oracle to postgres
Previous Message Pepe TD Vo 2019-01-29 14:07:26 import tablespaces from oracle to postgres