10g 数据泵导出,12c数据泵导入
admin
2023-04-14 15:41:41
0

10g

1、创建test用户相关信息
create directory dump_dir as '/home/oracle';
grant read,write on directory dump_dir to test;
grant exp_full_database to test;
2、导出test下面的相关信息
expdp test/test dumpfile=t.dmp

12c
create user test identified by test;
grant connect, resource to test;
grant exp_full_database to test;
grant imp_full_database to test;
GRANT UNLIMITED TABLESPACE TO test; 没有分配这一项,报错,相关信息如下。

我的导入:
impdp test/test directory=dump_dir dumpfile=t.dmp ;

Import: Release 12.1.0.2.0 - Production on Mon Apr 22 16:34:54 2019

Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
ORA-31626: job does not exist
ORA-31633: unable to create master table "TEST.SYS_IMPORT_FULL_05"
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: at "SYS.KUPV$FT", line 1048
ORA-01950: no privileges on tablespace 'USERS'

sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Mon Apr 22 16:37:56 2019

Copyright (c) 1982, 2014, Oracle. All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> GRANT UNLIMITED TABLESPACE TO test;

Grant succeeded.

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
impdp test/test directory=dump_dir dumpfile=t.dmp ;

Import: Release 12.1.0.2.0 - Production on Mon Apr 22 16:38:14 2019

Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
Master table "TEST"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "TEST"."SYS_IMPORT_FULL_01": test/**** directory=dump_dir dumpfile=t.dmp
Processing object type SCHEMA_EXPORT/USER
ORA-31684: Object type USER:"TEST" already exists
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "TEST"."TEST" 5.554 KB 24 rows
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
Processing object type SCHEMA_EXPORT/VIEW/VIEW
Job "TEST"."SYS_IMPORT_FULL_01" completed with 1 error(s) at Mon Apr 22 16:38:33 2019 elapsed 0 00:00:14

字符集问题:

export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK

select userenv('language') from dual;和新echo $LANG都一致但是导入还是有中文乱码,经过查询查找,发现源端设置了export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK,目标端没有设置,目标端设置以后,导入没有乱码了。

附录:
create user test identified by test;
grant connect, resource to test;
grant exp_full_database to test;
grant imp_full_database to test;
create directory dump_dir as '/home/oracle';
grant read,write on directory dump_dir to test;
GRANT UNLIMITED TABLESPACE TO test;

相关内容

热门资讯

赖清德窜访媚外,金门老百姓却苦... 探访厦金大桥赖清德“偷渡式”窜访,岛内民众大骂:这边民生受阻,那边你还去给外国人“跪”。反观今年4月...
特朗普访华,通用汽车和福特高层... 【文/观察者网 潘昱辰 编辑/高莘】美国总统特朗普将于5月13-15日对中国进行国事访问。据白宫披露...
还是谈不成,特朗普没招了 作者 | 谢奕秋 编辑 | 阿树美伊新一轮的和平提议交换,至5月10日宣告无果而终。伊朗对美国提案的...
网传“45岁独身男子病逝15万... 近日,南京一位老人照顾独身病侄,侄子离世后15万存款被转走的事件引发广泛关注。5月12日,针对网传“...
亚太经合组织电信工作组第72次... 来源:上海证券报·中国证券网 上证报中国证券网讯 据工业和信息化部5月12日消息,5月11日,亚太经...
银星能源获得实用新型专利授权:... 证券之星消息,根据天眼查APP数据显示银星能源(000862)新获得一项实用新型专利授权,专利名为“...
特朗普访华在即,随行商界大咖都... 美国总统特朗普将于5月13日至15日对中国进行国事访问。这是中美两国元首继去年10月釜山之后再次面对...
有线电视机顶盒安装问题求安装方... 有线电视安装说明: 一、将白色有线电视线一端连接有线电视终端盒另一端连接机顶盒后的射频输入口。 ...
60寸电视机尺寸画面长宽是多少...   60寸的液晶电视,60寸就是指电视屏幕对角线长度,因为长宽比有两种情况,经过寸转化为厘米计算之后...
长城电视机尺寸测量方法 长城电视机的尺寸测量方法与其他品牌的电视机测量方法基本相同。需要准备的工具有卷尺或直尺等测量工具,以...