oracle 10g的grid asmcmd是不支持copy命令的。
如要拷里面的文件出来,那必段用dbms_file_transfer包了。
DBMS_FILE_TRANSFER.COPY_FILE(
source_directory_object IN VARCHAR2,
source_file_name IN VARCHAR2,//只支持文件名,不支持目录
destination_directory_object IN VARCHAR2,
destination_file_name IN VARCHAR2
);
create directory asm_spfile as '+CNDATA/educn';
SQL> col directory_path for a80;
SQL> select * from dba_directories;
OWNER DIRECTORY_NAME DIRECTORY_PATH
-------- ------------------------------ --------------------------------------------------------------------------------
SYS DIR_DP /home/oracle/back_up
SYS EXP_DIR /u01/app/oracle/dir/exp_dir
SYS ORACLE_OCM_CONFIG_DIR /u01/app/oracle/product/10.2.0/db_1/ccr/state
SYS ASM_SPFILE +CNDATA/educn
SYS DATA_PUMP_DIR /u01/app/oracle/product/10.2.0/db_1/rdbms/log/
exec dbms_file_transfer.copy_file('ASM_SPFILE', 'spfileeducn.ora', 'DIR_DP', 'spfileeducn.ora')
归档拷贝
SQL> create directory arc_log as '+ARCHIVE/educn/archivelog/2013_11_16';
sql>exec dbms_file_transfer.copy_file('arc_log', 'thread_1_seq_67.354.831642407', 'DIR_DP', '20131116.arc')
SQL> host ls -lh /home/oracle/back_up
详细参见
http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_ftran.htm