Login  Register

move datafile

classic Classic list List threaded Threaded
4 messages Options Options
Embed post
Permalink
big
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

move datafile

big
442 posts
Hi,

On 19.9 C on AIX

I want to run:

SQL> ALTER SESSION SET container=pdb2;

SQL> ALTER DATABASE MOVE DATAFILE '/u01/app/oracle/oradata/pdb2/system01.dbf' TO '/u02/app/oracle/oradata/pdb2/system01.dbf' REUSE;

Should I copy the data file before to new location using OS cp commande?

Or oracle will do it?

Thanks.
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: move datafile

ErmanArslansOracleBlog
Administrator
5727 posts
The REUSE keyword indicates the new file should be created even if it already exists. That is REUSE overwrites data file with the same name. So I guess this answers your question.
big
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: move datafile

big
442 posts
Thank you.

Should copy them to new location or not?

Regards.
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: move datafile

ErmanArslansOracleBlog
Administrator
5727 posts
No, you don't need to copy or move.
& you are relocating a data File and overwriting an existing File.

Also see -> 12C New Feature : Move a Datafile Online (Doc ID 1566797.1)