Skip to main content

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

Post a Comment

Popular posts from this blog

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

Error: CDB$ROOT@EBTUPRDC> CREATE PLUGGABLE DATABASE EBTUSPRDPDB1 using '/home/oracle/EBTUSPRDC.xml' nocopy tempfile reuse; CREATE PLUGGABLE DATABASE EBTUSPRDPDB1 using '/home/oracle/EBTUSPRDC.xml' nocopy tempfile reuse * ERROR at line 1: ORA-65139: Mismatch between XML metadata file and data file /u05/odb/ORADATA_1/EBTUSPRDC/datafile/system.1531.807800993 for value of fcpsb (2230502002 in the plug XML file, 2230505492 in the data file) Fix: Don't open Non-CDB database until we complete pdb creation other wise we will get above error. Shutdown immediate; startup mount; alter database open read only; create xml file. shutdown immediate; Connect to CDB and Create Pluggable database .

Useful OEM Queries to get Target details from OEM Repository

List Targets with TNS Listener ports configured : SELECT mgmt$target.host_name , mgmt$target.target_name , mgmt$target.target_type , mgmt$target_properties.property_name , mgmt$target_properties.property_value FROM mgmt$target , mgmt$target_properties WHERE ( mgmt$target.target_name = mgmt$target_properties.target_name ) AND ( mgmt$target.target_type = mgmt$target_properties.target_type ) and ( mgmt$target.target_type = 'oracle_listener' ) and ( mgmt$target_properties.property_name = 'Port' ); Devora02       LISTENER_ora02                       oracle_listener Port 1529 Devora01       LISTENER_ora01                       oracle_listener Port 1529 Devora04       LISTENE...

TFA-00002 : Oracle Trace File Analyzer (TFA) is not running

TFA Failed to start listening for commands on one of the Rac Node : As a root user /etc/init.d/init.tfa  start Starting TFA.. start: Job is already running: oracle-tfa Waiting up to 100 seconds for TFA to be started.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Successfully started TFA Process.. . . . . . TFA-00002 : Oracle Trace File Analyzer (TFA) is not running TFA Failed to start listening for commands Solution : run synctfanodes.sh  if you have root password . if no root password copy below files to TFA Failed node and try to restart TFA .. Please check whether these 4 files exist on all nodes are similar. TFA_HOME/server.jks TFA_HOME/client.jks TFA_HOME/internal/ssl.properties   TFA_HOME/internal/ portmapping.txt If not similar just copy these files to TFA Failing node and try TFA Restart ..It Worked for me .   [root@host01]# ./tfactl  -v "debug" start Starting TFA...