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;

相关内容

热门资讯

【第一消息】“天天微友棋牌真的... 网上科普关于“天天微友棋牌有没有挂”话题很是火热,小编也是针对天天微友棋牌作*弊开挂的方法以及开挂对...
重磅消息“乐享牛牛是不是有挂?... 家人们!今天小编来为大家解答乐享牛牛透视挂怎么安装这个问题咨询软件客服徽4282891的挂在哪里买很...
玩家最新攻略“微信拼三张有没有... 网上科普关于“微信拼三张有没有挂”话题很是火热,小编也是针对微信拼三张作*弊开挂的方法以及开挂对应的...
【第一资讯】“闽悦麻将真的有挂... 有 亲,根据资深记者爆料闽悦麻将是可以开挂的,确实有挂(咨询软件无需打开...
终于懂了“卡农炸/金/花真的有... 您好:卡农炸/金/花这款游戏可以开挂,确实是有挂的,需要了解加客服微信【9784099】很多玩家在这...
重磅消息“新皇豪牛牛到底是不是... 重磅消息“新皇豪牛牛到底是不是挂?”(太坑了果然有挂)您好,新皇豪牛牛这个游戏其实有挂的,确实是有挂...
终于了解“笑傲江湖究竟有挂吗?... 您好:笑傲江湖这款游戏可以开挂,确实是有挂的,需要了解加客服微信【9752949】很多玩家在这款游戏...
【第一消息】“普通扑克雷达感应... 家人们!今天小编来为大家解答普通扑克雷达感应分析仪透视挂怎么安装这个问题咨询软件客服徽9784099...
玩家最新攻略“湘乐怎么开挂?”... 有 亲,根据资深记者爆料湘乐是可以开挂的,确实有挂(咨询软件无需打开直接...
重磅消息“普通扑克分析哪家大小... 重磅消息“普通扑克分析哪家大小开挂神器?”(太坑了原来有挂)您好,普通扑克分析哪家大小这个游戏其实有...