本文介绍如何从ASM磁盘中拷贝文件到本地文件系统
测试环境:ORACLE 10.2.0.4 + ASM
1、 在目标数据库上创建一个(源)目录(source_dir)
SQL> create or replace directory source_dir as '+xiner_data/xiner/datafile';
Directory created.
2、 在目标数据库上创建一个(目的)目录
SQL> create or replace directory data_dir as '/home/oracle/wangz';
Directory created.
3、 执行DBMS_FILE_TRANSFER包
SQL> BEGIN
dbms_file_transfer.copy_file(
source_directory_object =>'source_dir',
source_file_name => 'OCPTBS.268.745970939',
destination_directory_object => 'data_dir',
destination_file_name => 'OCPTBS.268.745970939');
END;
/
PL/SQL procedure successfully completed.
以上步骤就可以将ASM磁盘中的文件OCPTBS.268.745970939拷贝到本地文件系统/home/oracle/wangz目录中。
参考文档:
Metalink: How to copy a datafile from ASM to a file system not using RMAN [ID 428893.1]
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25834554/viewspace-707623/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/25834554/viewspace-707623/