Moving database dbf files

I was recently creating a database VM (Oracle Linux 6 Update 3 on Oracle VM) on my laptop and encountered this issue.

I have created a Virtual Disk for the database of 12 GB size and when I tried to install my schema using RCU I ran out of space. Solution was to create another Virtual Disk and move the database data files (.dbf) to this new drive. After few google search and looking at the blogs these are the steps I followed:

  1. Login to the database sqlplus / as sysdba
  2. Get the data file location select file_name from dba_data_files;
  3. Shutdown the database shutdown immediate
  4. Shutdown the listener lsnrctl stop
  5. Shutdown the VM Guest OS.
  6. Created a new Virtual Disk of 20 GB.
  7. Start the Guest OS.
  8. Mount the drive. My mount point is u02.
  9. Move the dbf files under oradata/SID folder to the new disk. You will find the oradata folder under your Oracle home. E.g. move DEV_soainfra.dbf from /u01/app/oradata/soa to /u02/app/oradata.
  10. Start the database using command startup mount
  11. Change the location of the dbf file using command alter database rename file '/media/u01/app/oradata/soa/DEV_soainfra.dbf' to '/media/u02/app/oradata/soa/DEV_soainfra.dbf';
  12. Start the database alter database open;

Comments

Popular posts from this blog

ORA-44412: XE edition memory parameter invalid or not specified

How to mount a WD Book Live as NFS in OEL6U3

BPEL Engine Exceptions ORABPEL 02000 - 02179