Oracle数据库备份异机恢复(exp/imp)故障案例
2016-03-24 13:44
651 查看
源端: 192.168.6.10 db
目标端:192.168.6.11 db10g
从192.168.6.10中exp导出两张表,其中通过scp将dmp文件拷贝至192.168.6.11服务器后imp导入错误,提示文件头有异常
源端服务器导出如下:
[oracle@db ~]$ exp test/test file='/home/oracle/test.dmp' tables=t1,test
Export: Release 11.2.0.4.0 - Production on Thu Mar 24 12:57:18 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses ZHS16GBK character set (possible charset conversion)
About to export specified tables via Conventional Path ...
. . exporting table T1 1 rows exported
EXP-00091: Exporting questionable statistics.
. . exporting table TEST 6 rows exported
EXP-00091: Exporting questionable statistics.
Export terminated successfully with warnings.
在源端服务器上测试导入正常:(因源端存在该对象,故提示跳过)
[oracle@db ~]$ imp test/test file='/home/oracle/test.dmp' fromuser=test touser=test
Import: Release 11.2.0.4.0 - Production on Thu Mar 24 12:58:54 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export file created by EXPORT:V11.02.00 via conventional path
import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses ZHS16GBK character set (possible charset conversion)
. importing TEST's objects into TEST
IMP-00015: following statement failed because the object already exists:
"CREATE TABLE "T1" ("ID" NUMBER, "NAME" VARCHAR2(2)) PCTFREE 10 PCTUSED 40 "
"INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 FRE"
"ELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) LOGGING "
"NOCOMPRESS"
IMP-00015: following statement failed because the object already exists:
"CREATE TABLE "TEST" ("ID" NUMBER) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRAN"
"S 255 STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 FREELISTS 1 FREELIST "
"GROUPS 1 BUFFER_POOL DEFAULT) LOGGING NOCOMPRESS"
Import terminated successfully with warnings.
[oracle@db ~]$
将exp的备份dmp文件scp到目标服务器导入失败:
[root@db oracle]# scp test.dmp 192.168.6.11:/home/oracle
root@192.168.6.11's password:
test.dmp 100% 16KB 16.0KB/s 00:00
oracle@db10g:orcl$imp test/test file='/home/oracle/test.dmp' fromuser=test touser=test
Import: Release 10.2.0.5.0 - Production on Thu Mar 24 12:58:36 2016
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
IMP-00010: not a valid export file, header failed verification
IMP-00000: Import terminated unsuccessfully
说明:
(1)异机传输备份文件,建议使用bin模式的ftp传输;
(2)要定期验证备份文件的可恢复性;异机恢复时,务必正常恢复后再将主端备份删除或者进行主端硬件维护等风险性操作。
目标端:192.168.6.11 db10g
从192.168.6.10中exp导出两张表,其中通过scp将dmp文件拷贝至192.168.6.11服务器后imp导入错误,提示文件头有异常
源端服务器导出如下:
[oracle@db ~]$ exp test/test file='/home/oracle/test.dmp' tables=t1,test
Export: Release 11.2.0.4.0 - Production on Thu Mar 24 12:57:18 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses ZHS16GBK character set (possible charset conversion)
About to export specified tables via Conventional Path ...
. . exporting table T1 1 rows exported
EXP-00091: Exporting questionable statistics.
. . exporting table TEST 6 rows exported
EXP-00091: Exporting questionable statistics.
Export terminated successfully with warnings.
在源端服务器上测试导入正常:(因源端存在该对象,故提示跳过)
[oracle@db ~]$ imp test/test file='/home/oracle/test.dmp' fromuser=test touser=test
Import: Release 11.2.0.4.0 - Production on Thu Mar 24 12:58:54 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export file created by EXPORT:V11.02.00 via conventional path
import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses ZHS16GBK character set (possible charset conversion)
. importing TEST's objects into TEST
IMP-00015: following statement failed because the object already exists:
"CREATE TABLE "T1" ("ID" NUMBER, "NAME" VARCHAR2(2)) PCTFREE 10 PCTUSED 40 "
"INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 FRE"
"ELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) LOGGING "
"NOCOMPRESS"
IMP-00015: following statement failed because the object already exists:
"CREATE TABLE "TEST" ("ID" NUMBER) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRAN"
"S 255 STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 FREELISTS 1 FREELIST "
"GROUPS 1 BUFFER_POOL DEFAULT) LOGGING NOCOMPRESS"
Import terminated successfully with warnings.
[oracle@db ~]$
将exp的备份dmp文件scp到目标服务器导入失败:
[root@db oracle]# scp test.dmp 192.168.6.11:/home/oracle
root@192.168.6.11's password:
test.dmp 100% 16KB 16.0KB/s 00:00
oracle@db10g:orcl$imp test/test file='/home/oracle/test.dmp' fromuser=test touser=test
Import: Release 10.2.0.5.0 - Production on Thu Mar 24 12:58:36 2016
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
IMP-00010: not a valid export file, header failed verification
IMP-00000: Import terminated unsuccessfully
说明:
(1)异机传输备份文件,建议使用bin模式的ftp传输;
(2)要定期验证备份文件的可恢复性;异机恢复时,务必正常恢复后再将主端备份删除或者进行主端硬件维护等风险性操作。
相关文章推荐
- oracle 修改表空间文件路径方法
- oracle操作
- 如何查看oracle trace 文件
- Oracle Nvl函数的正确用法
- oracle11g静默安装20140623
- oracle实现递归查询
- ORACLE的几个函数
- Oracle to_char()函数的使用细则
- 查看Oracle最耗性能SQL以及查看锁表进程SQL语句1和杀掉锁表进程
- Oracle中group by子句中cube的使用
- oracle 基础 创建表空间并分配用户权限
- Oracle中group by子句中rollup的使用
- oracle数据迁移--复制表--create table as select & select into & insert into
- Oracle--数据量增长过快策略
- oracle 复制一个表数据 到另一个表中,select into与insert into
- Plsql工具单步调试 存储过程或是 函数(oracle数据库)-留着自己用的
- oracle EBS采购订单各表作用分析
- Oracle session inactive状态临时表数据未清空问题
- Oracle生产固定GUID同时生成随机的GUID
- oracle 11g不能导出空表的多种解决方法