Renaming/Relocating/Move Data Files ONLINE from Release 12.1

Note: Online move only works with  Enterprise Edition(EE).


When we try to perform online move in SE it will fail with below error.


SYS@EPMDEV > ALTER DATABASE MOVE DATAFILE '/u05/odb/ORADATA_2/EPMDEV/epm_hfm_dev' TO '/u05/odb/ORADATA_2/EPMDEV/epm_hfm_dev.dbf';
ALTER DATABASE MOVE DATAFILE '/u05/odb/ORADATA_2/EPMDEV/epm_hfm_dev' TO '/u05/odb/ORADATA_2/EPMDEV/epm_hfm_dev.dbf'
*
ERROR at line 1:
ORA-00439: feature not enabled: online move datafile

SYS@EPMDEV > !oerr ora 439
00439, 00000, "feature not enabled: %s"
// *Cause:  The specified feature is not enabled.
// *Action: Do not attempt to use this feature.

In SE we have to perform datafile rename in same old traditional way (OFFLINE)..

Renaming an Online Data File:


SYS@EPMDEV > ALTER DATABASE MOVE DATAFILE '/u05/odb/ORADATA_2/EPMDEV/epm_hfm_dev' TO '/u05/odb/ORADATA_2/EPMDEV/epm_hfm_dev_1.dbf';

Relocating an Online Data File:


SYS@EPMDEV > ALTER DATABASE MOVE DATAFILE '/u05/odb/ORADATA_2/EPMDEV/epm_hfm_dev' TO '/u06/odb/ORADATA_2/EPMDEV/epm_hfm_dev.dbf';

After the operation, the file is no longer in the "/u05/odb/ORADATA_2/EPMDEV/"

Move Datafile With "KEEP" Option:


SYS@EPMDEV > ALTER DATABASE MOVE DATAFILE '/u05/odb/ORADATA_2/EPMDEV/epm_hfm_dev' TO '/u06/odb/ORADATA_2/EPMDEV/epm_hfm_dev.dbf' keep;

After the operation, the old file is retained in the "/u05/odb/ORADATA_2/EPMDEV/".


Move Datafile With "REUSE" Option:


SYS@EPMDEV > ALTER DATABASE MOVE DATAFILE '/u05/odb/ORADATA_2/EPMDEV/epm_hfm_dev' TO '/u06/odb/ORADATA_2/EPMDEV/epm_hfm_dev.dbf' reuse;

If a file with the same name exists in the "/u06/odb/ORADATA_2/EPMDEV/" directory, then the statement overwrites the file.

Move Datafile in PDB:

Same noncdb commands will work here ,we just need to switch respective pdb before running move command.


ALTER SESSION SET container=pdb2; then run move command

Comments

  1. Renaming/Relocating/Move Data Files Online From Release 12.1 >>>>> Download Now

    >>>>> Download Full

    Renaming/Relocating/Move Data Files Online From Release 12.1 >>>>> Download LINK

    >>>>> Download Now

    Renaming/Relocating/Move Data Files Online From Release 12.1 >>>>> Download Full

    >>>>> Download LINK Rw

    ReplyDelete

Post a Comment

Popular posts from this blog

ORA-28086: The data redaction policy expression has an error

ORA-65139: Mismatch between XML metadata file and data file

Useful OEM Queries to get Target details from OEM Repository