1.1 现象描述
使用管道进行数据备份。
1. 建立管道。
% mknod /home/exppipe p
2. 导出数据到建立的管道并压缩。
% exp system/emsems file=/export/home/exppipe full=y & gzip < /export/home/exppipe > exp.dmp.gz
3. 导出成功,删除建立的管道。
% rm -rf /home/exppipe
4. 建立管道。
% mknod /home/exppipe p
5. 导入生成的压缩文件。
% imp system/emsems file=/export/home/exppipe full=y &gzip < /export/home/exp.dmp.gz > /export/home/exppipe
系统显示如下错误信息:
[1] 19890
Import: Release 11.1.0.6.0 - Production on星期五3月27 12:24:58 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
IMP-00037: Character set marker unknown
IMP-00000: Import terminated unsuccessfully
[1]+ Exit 1 imp system/emsems file=/export/home/exppipe
1.2 可能原因
导入生成压缩文件命令使用错误,应该使用gunzip。
1.3 处理步骤
修改导入生成压缩文件的命令。
% imp system/emsems file=/export/home/exppipe full=y &gunzip < /export/home/exp.dmp.gz > /export/home/exppipe
导入成功,系统提示如下信息:
Import terminated successfully without warnings.
删除管道。
% rm -rf /home/exppipe