Re: How to alter PATH_PREFIX in a PDB after creation

From: Sayan Malakshinov <xt.and.r_at_gmail.com>
Date: Thu, 2 Jul 2020 11:53:57 +0300
Message-ID: <CAOVevU7=60_oh+ZxActrpi_=hi2SxyzAjEFkQ+0rjTLmKudC1Q_at_mail.gmail.com>



Hi Steve,

So can't you unplug and plug it again?
I've just checked and unplug/plug with nocopy and PATH_PREFIX=none can help:

SQL> CREATE PLUGGABLE DATABASE pdb2 ADMIN USER testuser identified by testuser
  create_file_dest='/opt/oracle/oradata/ORA18/PDB2/oradata'   PATH_PREFIX='/opt/oracle/oradata/ORA18/PDB2/dirs';

Pluggable database created.

SQL> ALTER PLUGGABLE DATABASE pdb2 UNPLUG INTO '/opt/oracle/oradata/ORA18/PDB2/PDB2.xml';

Pluggable database altered.

SQL> DROP PLUGGABLE DATABASE pdb2 *KEEP DATAFILES*;

Pluggable database dropped.

SQL> CREATE PLUGGABLE DATABASE pdb2 using '/opt/oracle/oradata/ORA18/PDB2/PDB2.xml' *nocopy PATH_PREFIX=none*;

Pluggable database created.

SQL> alter pluggable database pdb2 open;

Pluggable database altered.

SQL> alter session set container=pdb2;

Session altered.

SQL> create directory test as '/tmp/test';

Directory created.

On Thu, Jul 2, 2020 at 10:58 AM Norman Dunbar <oracle_at_dunbar-it.co.uk> wrote:

> On 02/07/2020 08:35, Steve Wales (AddOns) wrote:
> > I’m not very fluent in the intricacies of ASM but if Oracle let’s you
> > export to as ASM directory, I figure there has to be a way to drag my
> > 120GB datapump export file into +DATA inside ASM somehow. Maybe that’s
> > my solution? How would I manage to go about that ?
>
> Have you looked at the "cp" command in the asmcmd utility? That allows
> files to be copied into and out of ASm, apparently.
>
> Other, possible, options are the procedure DBMS_FILE_TRANSFER.COPY_FILE
> but that appears to only allow database files to be copied into AMD. :(
>
>
> HTH
>
> Cheers,
> Norm.
>
> --
> Norman Dunbar
> Dunbar IT Consultants Ltd
>
> Registered address:
> 27a Lidget Hill
> Pudsey
> West Yorkshire
> United Kingdom
> LS28 7LG
>
> Company Number: 05132767
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>

-- 
Best regards,
Sayan Malakshinov
Oracle performance tuning engineer
Oracle ACE Associate
http://orasql.org

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jul 02 2020 - 10:53:57 CEST

Original text of this message