ORACLE 11G在相同的linuxserver从实施例1满库到实例2上
早期的导出命令:
[root@powerlong4 ~]# su - oracle
[oracle@powerlong4 ~]$ export ORACLE_SID=pt1;
[oracle@powerlong4 ~]$ expdp \'sys/systestpd as sysdba\' DIRECTORY=dir_dump_t3 FULL=YES DUMPFILE=expdpfull_pd_20150529_02.dmp
......
1,開始导入
先在实例2上建立管道文件夹:
[oracle@pttest4 ~]$ export ORACLE_SID=pt2;
[oracle@pttest4 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Jun 3 21:22:43 2015
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> CREATE OR REPLACE DIRECTORY dir_dump_t3 AS '/home/oracle/expdpimpdp/';
Directory created.
SQL>
開始导入全库备份集:
impdp \'sys/syspddev@pt2 as sysdba\' directory=dir_dump_t3 dumpfile=expdpfull_pd_20150529_02.dmp nologfile=y TABLE_EXISTS_ACTION=REPLACE
......
<版权全部。文章同意转载,但必须以链接方式注明源地址,否则追究法律责任!>
原博客地址: http://blog.csdn.net/mchdba/article/details/46335861
原作者:黄杉 (mchdba)
2,导入报错:
ORA-02374: conversion error loading table "puser"."RES_APPROVE_CONTENT"
ORA-12899: value too large for column CREATED_POSITION_CD (actual: 24, maximum: 20)
3,怀疑导入目标错误,验证:
[oracle@pttest4 admin]$ export ORACLE_SID=pt2;
[oracle@pttest4 admin]$
[oracle@pttest4 admin]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Fri May 29 21:06:27 2015
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
SQL>
SQL> select name from v$database;
NAME
------------------
pt2
SQL>
4。检查两者的编码
到出库实例库1:
SQL> SELECT * FROM V$NLS_PARAMETERS WHERE PARAMETER IN ('NLS_CHARACTERSET', 'NLS_NCHAR_CHARACTERSET');
PARAMETER VALUE
---------------------------------------------------------------- ----------------------------------------------------------------
NLS_CHARACTERSET ZHS16GBK
NLS_NCHAR_CHARACTERSET AL16UTF16
SQL>
到导入的库实例2库
SQL> SELECT * FROM V$NLS_PARAMETERS WHERE PARAMETER IN ('NLS_CHARACTERSET', 'NLS_NCHAR_CHARACTERSET');
PARAMETER VALUE
---------------------------------------------------------------- ----------------------------------------------------------------
NLS_CHARACTERSET AL32UTF8
NLS_NCHAR_CHARACTERSET AL16UTF16
SQL>
看到导出导入库实例1实例2的字符集不同,所以问题就在这里了
5,解决:
[oracle@pttest4 admin]$ export ORACLE_SID=pt2;
[oracle@pttest4 admin]$
[oracle@pttest4 admin]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Fri May 29 21:06:27 2015
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
SQL>connect username/password as SYSDBA;
SQL>SHUTDOWN IMMEDIATE;
SQL>STARTUP MOUNT;
SQL>ALTER SYSTEM ENABLE RESTRICTED SESSION;
SQL>ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
SQL>ALTER SYSTEM SET AQ_TM_PROCESSES=0;
SQL>ALTER DATABASE OPEN;
SQL> ALTER DATABASE CHARACTER SET ZHS16GBK ;
ALTER DATABASE CHARACTER SET ZHS16GBK;
*ERROR at line 1:
ORA-12712: new character set must be a superset of old character set
报字符集不兼容,此时下INTERNAL_USE指令不正确字符集超集进行检查:
SQL>ALTER DATABASE CHARACTER SET INTERNAL_USE ZHS16GBK;
SQL>SHUTDOWN IMMEDIATE;
SQL>STARTUP;
6,再去检查两个实例的编码
[oracle@pttest4 expdpimpdp]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Fri May 29 21:32:12 2015
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select name from v$database;
NAME
---------
pt2
SQL>
SQL> SELECT * FROM V$NLS_PARAMETERS WHERE PARAMETER IN ('NLS_CHARACTERSET', 'NLS_NCHAR_CHARACTERSET');
Warning: connection was lost and re-established
PARAMETER VALUE
---------------------------------------------------------------- ----------------------------------------------------------------
NLS_CHARACTERSET ZHS16GBK
NLS_NCHAR_CHARACTERSET AL16UTF16
SQL>
导出实例上:
[oracle@pttest4 expdpimpdp]$ export ORACLE_SID=pt1;
[oracle@pttest4 expdpimpdp]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Fri May 29 21:32:50 2015
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select name from v$database;
NAME
---------
pt1
SQL> SELECT * FROM V$NLS_PARAMETERS WHERE PARAMETER IN ('NLS_CHARACTERSET', 'NLS_NCHAR_CHARACTERSET');
PARAMETER VALUE
---------------------------------------------------------------- ----------------------------------------------------------------
NLS_CHARACTERSET ZHS16GBK
NLS_NCHAR_CHARACTERSET AL16UTF16
SQL>
此时,两个实例上字符集一模一样了,保持一致。
7。又一次导入impdp
[oracle@pttest4 admin]$ export ORACLE_SID=pt2;
[oracle@pttest4 admin]$ impdp \'sys/sysdevpd@pt2 as sysdba\' directory=dir_dump_t3 dumpfile=expdpfull_pd_20150529_02.dmp nologfile=y TABLE_EXISTS_ACTION=REPLACE
OK,一切正常,能够导入到实例2上面了。
版权声明:本文博客原创文章,博客,未经同意,不得转载。
ORACLE 11G在相同的linuxserver从实施例1满库到实例2上的更多相关文章
- oracle 11g亿级复杂SQL优化一例(数量级性能提升)
自从16年之后,因为工作原因,项目中就没有再使用oracle了,最近最近支持一个项目,又要开始负责这块事情了.最近在跑性能测试,配置全部调好之后,不少sql还存在性能低下的问题,主要涉及执行计划的不合 ...
- Oracle 11g 中SQL性能优化新特性之SQL性能分析器(SQLPA)
Oracle11g中,真实应用测试选项(the Real Application Testing Option)提供了一个有用的特点,叫SQL性能分析器(SQL Performance Analyze ...
- oracle 11g r2 rac到单实例的dg
oracle 11g r2 rac到单实例的dg 1 主备环境说明 rac环境--primary CentOS release 6.5 (Final)hostname rac1 rac2ip 10.* ...
- Oracle 11g 单实例到单实例OGG同步实施文档-OGG initial load
Oracle 11g 单实例到单实例OGG同步实施文档-OGG initial load 2018-06-07 00:514730原创GoldenGate 作者: leo 本文链接:https://w ...
- Oracle 11g 单实例到单实例OGG同步实施文档-RMAN 初始化
Oracle 11g 单实例到单实例OGG同步实施文档-RMAN 初始化 2018-06-07 13:455170原创GoldenGate 作者: leo 本文链接:https://www.cndba ...
- Oracle 11g 单实例到单实例OGG同步实施文档-EXPDP初始化
Oracle 11g 单实例到单实例OGG同步实施文档-EXPDP初始化 2018-06-07 00:446470原创GoldenGate 作者: leo 本文链接:https://www.cndba ...
- Oracle 11g新特性
文章转自网络 Oracle 11g于2007年7月11日美国东部时间11时(北京时间11日22时)正式发布,11g是甲骨文公司30年来发布的最重要的数据库版本,根据用户的需求实现了信息生命周期管理(I ...
- 解决Oracle 11g在用EXP导出时,空表不能导出
实践结论可行,看"2.解决办法" 一.问题原因: 11G中有个新特性,当表无数据时,不分配segment,以节省空间 1.insert一行,再rollback就产生 ...
- Oracle 11g RAC 修改各类IP地址
Oracle 11g RAC 修改各类IP地址 首先,我们都知道Oracle 11g RAC中的IP主要有:Public IP.VIP.SCAN VIP.Private IP这几种. 一般这类改IP地 ...
随机推荐
- [慕课笔记]Node入口文件分析和目录初始化
1:我们要在根目录下安装这些模块 2:然后来编写这些入口文件,这几行代码的大概意思是说,我引入一个express的模块,然后生成一个webview 的实例,将这个实例的监听端口设置成3000,然后就可 ...
- [Tools] Fix Only Committed Files with Prettier and lint-staged
In this lesson we'll use prettier and lint-staged to run prettier only on files that have been chang ...
- Vim技巧之四大模式_插入模式
Vim技巧之四大模式_插入模式 在插入模式中及时更正错误 插入-普通模式 在插入模式模式以下直接粘贴指定寄存器的内容 插入模式中做运算 用字符编码插入很常使用字符 替换已有的文本 Vim技巧之四大模式 ...
- PatentTips - Highly-available OSPF routing protocol
BACKGROUND OF THE INVENTION FIG. 1A is a simplified block diagram schematically representing a typic ...
- swift学习第六天:数组
数组 数组的介绍 数组(Array)是一串有序的由相同类型元素构成的集合 数组中的集合元素是有序的,可以重复出现 Swift中的数组 swift数组类型是Array,是一个泛型集合 数组的初始化 数组 ...
- swift学习第一天:认识swift以及swift的常量和变量
一:认识swift // 1.导入框架 //#import <UIKit/UIKit.h> import UIKit // 2.定义一个标识符 // int a = 10; // swif ...
- 【74.89%】【codeforces 551A】GukiZ and Contest
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard o ...
- ios开发总结:Utils常用方法等收集,添加扩展类,工具类方法,拥有很多方便快捷功能(不断更新中。。。)
BOBUtils 工具大全 本人github开源和收集功能地址:https://github.com/niexiaobo [对ios新手或者工作一年以内开发人员很有用处] 常用方法等收集.添加扩展类. ...
- Android 设置图片透明度
我了解的比较快捷的ImageView设置图片的透明度的方法有: setAlpha(); setImageAlpha(); getDrawable().setAlpha(). 其中setAlpha()已 ...
- 【poj3225】Help with Intervals
Time Limit: 6000MS Memory Limit: 131072K Total Submissions: 12084 Accepted: 3033 Case Time Limit ...