Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1goUca-0000j7-5Z for pgsql-admin@arkaria.postgresql.org; Tue, 29 Jan 2019 14:44:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1goUcY-0005Uz-R0 for pgsql-admin@arkaria.postgresql.org; Tue, 29 Jan 2019 14:44:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1goUcX-0005Us-Qt for pgsql-admin@lists.postgresql.org; Tue, 29 Jan 2019 14:44:14 +0000 Received: from sonic310-14.consmr.mail.bf2.yahoo.com ([74.6.135.124]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1goUcU-0004rL-Q8 for pgsql-admin@lists.postgresql.org; Tue, 29 Jan 2019 14:44:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1548773049; bh=UX5ZPWRiWhLbE/zxep7OKGY26WXJtA7CXCmsz3WHHhM=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:From:Subject; b=Q04g5gzCqjr1OsLvUhUnxNXQqhV/osc784220sx8WR3Hw2bB/6tFLNCfBUm8kspYXEz3FgsdP4pMbbS/3YcitYDTS5lCLfy2Bc9Na+4eA6UmT8h2r125uiZc7xa+yyjAXul+v6EZuHIc/2BQ6VPhUP/CqOjxmHQTavcIKA2njCMqmVN5jAhmlmN5OqpSDCU8VbE3aW8KcIG2CApmNLWqjFvRE55Xf/k1TIrh/HO0LgozeTgShIr02BwVLyIoaNj38v41Sd1ersfIToddLQmozFit4jZbXloiBGGDP85JvPi63R58k8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QdKFBI8oUzEgTEHr5I9kckbcZoTtM1w Ogbm_RWtk1rjUYnD4K4NqMxxoQItQIPqmn2SFdPcLJzUPBpIj91mWtBT4OItnpKgbAMI_ES2aHA- - Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.bf2.yahoo.com with HTTP; Tue, 29 Jan 2019 14:44:09 +0000 Date: Tue, 29 Jan 2019 14:44:05 +0000 (UTC) From: Pepe TD Vo Reply-To: Pepe TD Vo To: Shreeyansh Dba Cc: Pgsql-admin Message-ID: <1551327578.3016836.1548773045825@mail.yahoo.com> In-Reply-To: References: <583336373.3022264.1548770846372.ref@mail.yahoo.com> <583336373.3022264.1548770846372@mail.yahoo.com> Subject: Re: import tablespaces from oracle to postgres MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3016835_1276926562.1548773045822" X-Mailer: WebService/1.1.13027 YahooMailNeo Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 Content-Length: 18347 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_3016835_1276926562.1548773045822 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Yes, sir/mam'm, I manually created those extra tablespaces and still get error above.=C2=A0= Seems to me one tablespace for each directory?=C2=A0 I can't have multiple= tablespaces under /opt/postgres11/data/cidr right?=C2=A0 currently the cid= r datbase default tablespace is cidr_data.=C2=A0 How can I create database = with default_tablespaces with cidr_dba, cidr_lg, cidr_dg, etc...?=C2=A0 can= a database has multi-tablespaces? thank you,=C2=A0 Bach-Nga No one in this world is pure and perfect.=C2=A0 If you avoid people for the= ir 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 t= o 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=20 On Tuesday, January 29, 2019 9:37 AM, Shreeyansh Dba wrote: =20 Hi Pepe, Yes, you can create the tablespaces manually just by changing your tablespa= ce 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 wrote: Hi experts, I am using Ora2pg to export cidr in oracle to postgres.=C2=A0 When the expo= rt Tablespace.sql is done, I import into the Postgres, Cidr.=C2=A0 I get ER= ROR 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, b= ut PG_11_20109051 is belong to cidr_data tablespace, how can I create new t= ablespaces for cidr postgres db? $psql -U posgres -d CIDR=C2=A0$psql> create tablespace cidr_lg location 'op= t/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.=C2=A0 If you avoid people for the= ir 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 t= o 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 =20 ------=_Part_3016835_1276926562.1548773045822 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Yes, sir/mam'm,

I manually created those extra tablespaces and st= ill get error above.  Seems to me one tablespace for each directory?&n= bsp; I can't have multiple tablespaces under /opt/postgres11/data/cidr righ= t?  currently the cidr datbase default tablespace is cidr_data.  = How can I create database with default_tablespaces with cidr_dba, cidr_lg, = cidr_dg, etc...?  can a database has multi-tablespaces?

thank you,
 
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 perfe= ct gentleman (Hermione Gingold)

**Live simply **Love generously **Care deeply **Speak kindly.
*** Genuinely rich *** Faithful talent *** Sharing success


On = Tuesday, January 29, 2019 9:37 AM, Shreeyansh Dba <shreeyansh2014@gmail.= com> wrote:


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 t= ime of importing into the Postgres.

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


On Tue, Jan 29, 2019 at 7:37 P= M Pepe TD Vo <pepevo@yaho= o.com> wrote:
Hi experts,

I am using Ora2pg to export cidr i= n oracle to postgres.  When the export Tablespace.sql is done, I impor= t into the Postgres, Cidr.  I get ERROR below

$psql -U posgres -d C= IDR < TABLESPACE_cidrdba.sql
SET
CREATE TABLESPACE
ERROR: directory"/opt/postgres11/data/c= idr/PG_11_201809051" already in use as a tablespace.

ev= en 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 tab= lespaces 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<= br clear=3D"none" id=3D"yiv6647266961gmail-m_-6837923169866834585yui_3_16_0= _ym19_1_1548767629811_71485" style=3D"color:rgb(36,41,46);font-family:-appl= e-system, BlinkMacSystemFont,;">CREATE TABLESPACE
ERROR: directory"/opt= /postgres11/data/cidr/PG_11_201809051" already in use as a tablespace.

<= /div>
how can I create new tablespaces for cidr = postgres db?
v/r,
=

Bach-Nga

No one in this world is pure and perfect.&nbs= p; If you avoid people for their mistakes you will be alone. So judge less,= love and forgive more.
To c= all him a dog hardly seems to do him justice though in as much as he had fo= ur legs, a tail, and barked, I admit he was, to all outward appearances. Bu= t to those who knew him well, he was a perfect gentleman (Hermione Gingold)=

**Live simply **Love generously **Care deeply **Speak ki= ndly.
*** Genuinely rich *** Faithful talent *** Sharing success


=
------=_Part_3016835_1276926562.1548773045822--