This discussion is archived
2 Replies Latest reply: Feb 11, 2013 6:26 PM by Victor Armbrust RSS

Copying files inside ASM to Local Server

947473 Newbie
Currently Being Moderated
Hi All,

How to transfer a file in ASM to Local Disk in Windows 2008 R2. (+DBDATA/DB01/DATAFILES/USERS* to D:\Yusuf\DB01\Datafiles). Oracle Software is installed in D Drive.

ASMCMD> cp +DBDATA/DB01/DATAFILES/USERS* /Yusuf/DB01/Datafiles

Question here is, suppose if i want to transfer the file from ASM to a drive other than the Oracle Database Software installed Drive, how to mention the target path.

Oracle ASM Instance Version is 11.2.0.2.0

Thanks,
Yusuf

Edited by: 944470 on Feb 11, 2013 9:18 AM
  • 1. Re: Copying files inside ASM to Local Server
    onedbguru Pro
    Currently Being Moderated
    If you are using OMF you shouldn't need to be copying files to/from ASM. What errors are you getting? what is not working? are you using the correct syntax? See the documentation.
  • 2. Re: Copying files inside ASM to Local Server
    Victor Armbrust Oracle ACE
    Currently Being Moderated
    Hi, I don't know if I understand clearly what you want. Do you need to Copy Datafiles from a specific tablespace in ASM to Filesystem (D:) ? Is that correct?
    If so, you can follow some steps

    - Make your tablespace READY to copy outside ASM

    1 - If your database is UP and Runing:
    - copy files using RMAN
     RMAN>BACKUP DATAFILE '<datafile_name>.dbf' as copy format 'D:\Yusuf\DB01\Datafile\<datafile_name>.dbf' 
    - do the last step for all datafiles on the tablespace you want
    - make your tablespace offline
     SQL>alter tablespace <tbs_name> offline; 
    - switch your datafiles to copy
     RMAN> switch datafile'<datafile_name>.dbf' to copy; 
    - recover datafiles (if needed)
     RMAN> recover datafile'<datafile_name>.dbf'; 
    - make tablespace online
     SQL>alter tablespace <tbs_name> online; 
    - It is done. Your datafiles for a specific tablespace are outside ASM, however, you needed to make the tablespace unavailable


    2 - If your database don't need to be Up:
    - Shutdown immediate
    - copy datafiles from ASM to Filesystem:
     ASMCMD>cp +DBDATA/DB01/DATAFILES/USERS* to D:\Yusuf\DB01\Datafiles
    - startup nomount
     SQL>alter database rename file '<datafile_name>.dbf' to '<new_filesystem_datafile_name>.dbf'; 
    - do the last step for all datafiles on the tablespace you want
    - Startup normal

    - It is done. Your datafiles for a specific tablespace are outside ASM, however, you needed to make your database unavailable

    Hope have helped

    Victor

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points