I'd like to copy backuped files from asm to file system, oracle 10g, so there is no cp command in asmcmd.
I tried to use RMAN:
RMAN>copy datafile '+DATA/MYDB/BACKUPSET/2013_07_26/nnn_BACKUP_yyyyyy' to '/tmp/backup01'
but got an error: "error while looking up datafile: +DATA/MYDB... "
I checked with asmcmd, the file is present...
You can use DBMS_FILE_TRANSFER
i also found on link you can check it OraFAQ Forum: Server Administration &raquo; Copy many files from ASM to FileSystem, need an issue
Sorry, I don't understand what do you mean by this:
"We are assuming that '+DATA/MYDB/BACKUPSET/2013_07_26/nnn_BACKUP_yyyyyy' is a copy of a datafile"
This is in fact file created by daily backup.
And I got an error:
RMAN>BACKUP DATAFILE '+DATA..." FORMAT '/tmp/..' :
datafile not found in the recovery catalog
RMAN-06010: error while looking up datafile: +DATA...
I tried DBMS_FILE_TRANSFER first of all, but it doesn't work.
If I set ORACLE_SID intact (mydb), I got an error about invalid source file format "+DATA..."
If I set ORACLE_SID to ASM (+ASM), sqlplus couldn't find a package DBMS_FILE_TRANSFER.
You started with "copy datafile" -- implying that the file was a datafile or a copy of a datafile. If it is a backup piece, it is a different format from a datafile or copy of a datafile. If it is a backuppiece, you have to use the BACKUP BACKUPSET FROM TAG '<tag_of_the_backupset>' FORMAT '/tmp/Backup_%U' command
Hemant K Chitale
You did not read the doc, You need to create directory object at DB level( create directory..) which point out to source and target location , then it will work
source_directory_object IN VARCHAR2,
source_file_name IN VARCHAR2,
destination_directory_object IN VARCHAR2,
destination_file_name IN VARCHAR2);