Oracle中采取expdp 导出的表空间 删除表空间后采用impdp导入报错
Oracle中采用expdp 导出的表空间 删除表空间后采用impdp导入报错
[color=#FF0000]
C:\Users\yanbin>impdp yanbin/909150 directory=dir_dump dumpfile=CWBASE10.dmp tab
lespaces=cwbase10
Import: Release 11.2.0.1.0 - Production on 星期二 5月 27 16:22:10 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-31626: 作业不存在
ORA-31633: 无法创建主表 "YANBIN.SYS_IMPORT_TABLESPACE_05"
ORA-06512: 在 "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: 在 "SYS.KUPV$FT", line 1020
ORA-00959: 表空间 'CWBASE10' 不存在
[/color]
------解决方案--------------------
ORA-00959: 表空间 'CWBASE10' 不存在
说的很清楚了啊
------解决方案--------------------
一般导入导出主要是表或者SCHEMA,表空间确实没有尝试过。以下是上次自己做实验的记录,LZ可以参考:
使用导入导出工具复制schema
a. 使用导出工具导出某个用户的schema:
expdp system/<password> DIRECTORY=datamove DUMPFILE=schema_exp.dmp SCHEMAS=hr
b. 创建新的表空间,新用户
创建新的表空间:create tablespace test datafile '/u01/app/oracle/oradata/orcl11g/test01.dbf' size 100M autoextend on next 10M;
创建用户:
create user hr1
identified by hr1
default tablespace test
temporary tablespace TEMP;
c. 导入到另外一个用户,同一个表空间中(程序会自动将数据导入新用户hr1,但是仍旧是原来的表空间example)
impdp system/<system> directory=datamove dumpfile=schema_exp.dmp schemas=hr remap_schema=hr:hr1
d. 导入到另外一个用户,另外一个表空间中
impdp system/<system> directory=datamove dumpfile=schema_exp.dmp schemas=hr remap_schema=hr:hr1 remap_tablespace=example:test
e. 检查:select * from user_segments;
------解决方案--------------------
remap_tablespace ,这个参数 LZ 研究一下。
[color=#FF0000]
C:\Users\yanbin>impdp yanbin/909150 directory=dir_dump dumpfile=CWBASE10.dmp tab
lespaces=cwbase10
Import: Release 11.2.0.1.0 - Production on 星期二 5月 27 16:22:10 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-31626: 作业不存在
ORA-31633: 无法创建主表 "YANBIN.SYS_IMPORT_TABLESPACE_05"
ORA-06512: 在 "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: 在 "SYS.KUPV$FT", line 1020
ORA-00959: 表空间 'CWBASE10' 不存在
[/color]
------解决方案--------------------
ORA-00959: 表空间 'CWBASE10' 不存在
说的很清楚了啊
------解决方案--------------------
一般导入导出主要是表或者SCHEMA,表空间确实没有尝试过。以下是上次自己做实验的记录,LZ可以参考:
使用导入导出工具复制schema
a. 使用导出工具导出某个用户的schema:
expdp system/<password> DIRECTORY=datamove DUMPFILE=schema_exp.dmp SCHEMAS=hr
b. 创建新的表空间,新用户
创建新的表空间:create tablespace test datafile '/u01/app/oracle/oradata/orcl11g/test01.dbf' size 100M autoextend on next 10M;
创建用户:
create user hr1
identified by hr1
default tablespace test
temporary tablespace TEMP;
c. 导入到另外一个用户,同一个表空间中(程序会自动将数据导入新用户hr1,但是仍旧是原来的表空间example)
impdp system/<system> directory=datamove dumpfile=schema_exp.dmp schemas=hr remap_schema=hr:hr1
d. 导入到另外一个用户,另外一个表空间中
impdp system/<system> directory=datamove dumpfile=schema_exp.dmp schemas=hr remap_schema=hr:hr1 remap_tablespace=example:test
e. 检查:select * from user_segments;
------解决方案--------------------
remap_tablespace ,这个参数 LZ 研究一下。