impdp system/password directory=ABC TABLE_EXISTS_ACTION=replace dumpfile=test.dmp schemas=blogs logfile=impdp.log
环境描述:
需要通过EXPDP将数据备份到远端的cifs设备上,但是在进行备份的时候,写入文件报错:
;;;
Export: Release 10.2.0.4.0 - 64bit Production on 星期二, 20 3月, 2012 3:30:01
Copyright (c) 2003, 2007, Oracle. All rights reserved.
;;;
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39097: Data Pump job encountered unexpected error -31643
ORA-39065: unexpected master process exception in FILE
ORA-31643: unable to close dump file "/data_bak/ftp_dir/system_full_data12-03-20.dmp"
ORA-19510: failed to set size of 1 blocks for file "/data_bak/ftp_dir/system_full_data12-03-20.dmp" (blocksize=4096)
ORA-27045: unable to close the file
Linux-x86_64 Error: 5: Input/output error
Additional information: 4
~
问题解决:
原始挂载方式:
sudo mount //cifshost/Ora_bak ./ftp_dir/ -o username=user,password=passwd,rw,file_mode=0777,dir_mode=0777,uid=500,gid=501 -t cif
由于cifs本身有对数据的缓存及优化,最终导致和expdp程序句柄操作存在冲突导致了程序执行异常;
新的挂载方式:
//cifshost/Ora_bak /data_bak/ftp_dir cifs username=user,password=passwd,directio,noperm,rsize=32768
,wsize=32768,rw,file_mode=0777,dir_mode=0777,uid=500,
gid=501,