数据库跨平台迁移

客户为省钱,要把AIX server“干掉”! 原来跑在上面的应用/数据库统统搬到WinNT2000上。

若数据量不大,推荐用exp/imp方式,如下。

方法一 expdp/impdp

导出准备:

CONNECT system/***
CREATE OR REPLACE DIRECTORY expdir AS ‘

导出语法:

expdp "'system/*** as sysdba'" directory=expdir dumpfile=expdp_full.dmp logfile=impdp.log full=y

本次运行碰到的错误:(仅供参考)

ORA-39006: internal error
ORA-39065: unexpected master process exception in DISPATCH
ORA-00942: table or view does not exist
ORA-39097: Data Pump job encountered unexpected error -942

解决办法:(仅供参考)

ACTION PLAN
===========
1. Catdph.sql will Re-Install DataPump types and views:
SQL >@ $ORACLE_HOME/rdbms/admin/catdph.sql
Note: If XDB is installed the it is required to run "catmetx.sql" script. also.

2. prvtdtde.plb will Re-Install tde_library packages:
SQL >@ $ORACLE_HOME/rdbms/admin/prvtdtde.plb

3. Catdpb.sql will Re-Install DataPump packages:
SQL >@ $ORACLE_HOME/rdbms/admin/catdpb.sql

4.Dbmspump.sql will Re-Install DBMS DataPump objects:
SQL >@ $ORACLE_HOME/rdbms/admin/dbmspump.sql

5. To recompile invalid objects, if any:
SQL >@ $ORACLE_HOME/rdbms/admin/utlrp.sql

导入准备:

建好表空间/数据文件,和源数据库一样。

参考脚本(运行在源数据库):

select 'CREATE TABLESPACE "'||tablespace_name|| '" LOGGING DATAFILE +' ||FILE_NAME||
'+ SIZE 0M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;'
from dba_data_files
order by tablespace_name
-- ALTER TABLESPACE "NAME" ADD DATAFILE 'NAME' SIZE 0M;

导入语法(同样要先建好directory):

impdp "'system/*** as sysdba'" directory=expdir dumpfile=expdp_full.dmp logfile=impdp.log full=y

本次运行碰到的错误和解决办法:(仅供参考)

ORA-31684: Object type %s:"%s" already exists
ORA-39151: Table "%s"."%s" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
ORA-39111: Dependent object type %s:"%s" skipped, base object type %s:"%s"."%s" already exists

Of the other errors that occurred:

1. the errors on creating the UNDOTBS tablespace can be ignored as the path specification
is invalid, and the current database must be using a different undo tablespace name.

2. The failure to create the PROCOBJ object due to the PLS-201 error on
'BMS_SCHEDULER.DISABLE' is due to bug:4328909 fixed in 11.1 and 10.2.0.4. A
generic one-off patch is available for 10.2.0.3 via patch number 4328909.

3. The "ORA-27486: insufficient privileges" errors on importing the MGMT_CONFIG_JOB
and MGMT_STATS_CONFIG_JOB scheduler jobs are due to bug:5668604 fixed in 11.1.
There is no fix available for that on top of 10.2.0.3, however the issue is documented in
Note:881601.1 which details how to workaround the errors.

方法二 传统exp/imp

导出语法:

exp parfile=.par (若是全库导出,输入用户名/密码时推荐用system/<>)

$more .par

log=<>.log
file=<>.dmp
buffer=1048576
full=y
rows=y
grants=y
indexes=y
compress=y
constraints=y
consistent=y
direct=y
statistics=none

本次运行碰到的错误:(仅供参考)

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit
Production
With the Partitioning, OLAP and Data Mining options
EXP-00105: parameter CONSISTENT is not supported for this user
Export done in UTF8 character set and AL16UTF16 NCHAR character set
server uses WE8ISO8859P1 character set (possible charset conversion)

About to export the entire database ...
. exporting tablespace definitions
. exporting profiles
. exporting user definitions
. exporting roles
EXP-00008: ORACLE error 6550 encountered
ORA-06550: line 1, column 19:
PLS-00905: object SYS.DBMS_JVM_EXP_PERMS is invalid
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
EXP-00083: The previous problem occurred when calling SYS.DBMS_JVM_EXP_PERMS.gra
nt_sysprivs_exp
. exporting resource costs
. exporting rollback segment definitions
. exporting database links
. exporting sequence numbers
. exporting directory aliases
. exporting context namespaces
. exporting foreign function library names
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions
. exporting system procedural objects and actions
. exporting pre-schema procedural objects and actions
. exporting cluster definitions
EXP-00056: ORACLE error 600 encountered
[], [], [], [], []
EXP-00056: ORACLE error 600 encountered
ORA-00600: internal error code, arguments: [unable to load XDB library], [], [],
[], [], [], [], []
EXP-00000: Export terminated unsuccessfully

解决办法: (一般只需做step 2.)

Solution


Please follow step by step this instructions to fix the unable to load the XDB
library error:


1. Stop the database and stop the listener.

2. Set LIBPATH so the first directory referenced is $ORACLE_HOME/lib
Example (replace $ORACLE_HOME with the full path of the Oracle home directory):

csh:

setenv LIBPATH $ORACLE_HOME/lib:$ORACLE_HOME/lib32:

ksh:

export LIBPATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32:

Make sure $ORACLE_HOME/lib is first and $ORACLE_HOME/lib32 is second.

3. run /usr/sbin/slibclean as root

4. Re-start the database and the listener.

导入语法:

imp parfile=<>.par

不罗嗦了, 请读者自己试着写parfile内容~哈哈!

 

总结:感觉是data pump方式(即方法一)要快一些,就像Oracle官方说的那样。

但exp/imp方式比较稳妥,可能不会碰到很多bug。
 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/716233/viewspace-615578/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/716233/viewspace-615578/

rman从aix到linux跨平台恢复,利用RMAN跨平台迁移数据库 1、数据文件字节排序Oracle平台一般使用两种不同的字节排序方案(尾数格式)。如果多个平台使用的字节排序方案不同,则需要在RMAN中使用convert命令来将表空间转换为目标平台上所需的格式。可以通过以下查询确定尾数格式:select endian_formatfrom v$transportable_platform tp,v$database dwhere tp.platform_name=... 阅读详情

相关推荐

Oracle数据库跨平台迁移:RMAN和Data Pump的最佳实践

Oracle数据库从Linux平台迁移到HP Tru64 UNIX平台。示例2:在目标系统转换数据库格式(Linux到Windows)将Oracle数据库从Linux平台迁移到Windows平台。示例1:在源系统转换数据库格式(Linux到Windows):在目标系统上使用RMAN将数据库转换为目标平台格式。在目标系统上使用RMAN将数据库转换为目标平台格式。传输数据文件、PFILE和转换脚本到目标平台。传输数据文件、PFILE和转换脚本到目标平台。:使用RMAN将数据库转换为目标平台格式。

zgt_certificate的博客 915

minidot:从属对象类型(DOT),自下而上

一个很好的证明使我们更加明智。 -尤里·马宁(Yuri Manin) DOT微积分及其变化 从下到上对从属对象类型(DOT)演算进行形式化,并在每个步骤中进行稳健性证明。 向相关对象类型的强规范化(ECOOP'17) 从F到DOT:使用定义解释器输入正确性证明(POPL'17) 相关对象类型的类型健全性(OOPSLA'16) 路径相关类型的基础(OOPSLA'14) muDOT

oracle备份恢复

oracle备份恢复, Oracle数据库有三种标准的备份方法,它们分别是导出/导入(EXP/IMP)、热备份和冷备份。导出备件是一种逻辑备份,冷备份和热备份是物理备份。   一、 导出/导入(Export/Import)   利用Export可将数据从数据库中提取出来,利用Import则可将提取出来的数据送回到Oracle数据库中去。

使用oracle数据泵时报ORA-39097

测试环境在使用impdp时报错,报错信息如下: Import: Release 10.2.0.2.0 - 64bit Production on Monday, 28 March, 2011 16:00:04 C...

ckreglt13022的博客 1696

expdp impdp

<br />Manipulate data through SQL<br />Use Data Pump to export data<br />Use Data Pump to import data<br />Load data with SQL Loader<br /> <br />逻辑备份工具----数据泵<br />使用专用的API导入导出数据,速度快<br />EXPDP只能用于服务器端,而不能用于客户端<br />一,导出,导入表<br />C:/Users/solo>sqlplus  "/

5024

ORA-39097:Data Pump job encountered unexpected error 06502

      由于1套数据库迁移(10g双机到11g rac上)使用数据泵导入导出时出现坏块。这是一个分区表,10231事件等跳不过坏块,坏块在表上,并且有多处。将分区表的所有分区取出,创建一个parfile(aa.par)内容就是:              tables=table:pxxxxa,table:pxxxxb,....然后导出expdp user/password  dumpfile...

huoshuyinhua的专栏 4346

ORA-39111: Dependent object type ALTER_PROCEDURE

多次测试,分开按用户一个一个导入都遇到该问题,不影响使用,就是为了找到问题点,最后没办法了,没加parallel=4 cluster=N参数,导入的时间多了1倍多,但是不报ORA-39111了。将12.2环境中的几个用户迁移到19c中,因数据量较大,我加了parallel=4 cluster=N,仅仅为了加快导入速度,发现报错如下。这几天遇到一个怪问题,经过多轮测试,找到问题点记录下。查看mos,好像有个类似的文档。

kevinyu998的博客 1554

应用RMAN Transportable Database进行数据库跨平台迁移

Purpose(目标) 在进行数据库跨平台迁移的时候,可能用到的办法由expdp/impdp, exp/imp, rman tts和本文介绍的 rman transportable database,transportab...

222

使用RMAN Convert Database命令实现跨平台数据库迁移

下面是一段使用RMAN Convert Database命令将Oracle 11.2.0.3 Database for Windows 64bit环境下的数据库迁移Oracle 11.2.0.3 Database for Linux 64bit的实验。 1.以只读方式打开数据库。 SQL> shutdown immediate 数据库已经关闭。 已经卸载数据库ORACL

小楼一夜听春雨,深巷明朝卖杏花 1995

oracle 域 迁移 linux,Oracle数据库跨平台迁移(Linux到Windows)

Oracle数据库从Linux平台到Windows跨平台迁移1. 场景说明1.1.客户原环境OS:Red Hat Enterprise Linux Server release 6.5DB:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production服务器:华为RH2485 V2存储:OceanStor S...

weixin_39713578的博客 762

利用Oracle Data Guard完成跨平台数据库迁移案例

客户原本是一套单机版的Oracle11.2.0.3.0Database forWindows的数据库系统,客户的需求是将单机版的Oracle Database迁移到3节点的Oracle RAC Database中,并且平台变成Linux,但数据库版本不变化。客户希望尽可能短的停机时间。 通常对于不跨版本的Oracle Database迁移常使用DG(Data Guard),配置好DG之后做一...

Data & Analysis 1347

Oracle必杀技物理删除数据文件恢复

Oracle必杀技物理删除数据文件恢复,详解了实用的Oracle物理表空间删除修复命令。

ORACLE数据库xtts跨平台迁移DB

xtts: 1. 源: execute dbms_tts.transport_set_check('DC',true,true); select * from TRANSPORT_SET_VIOLATIONS 全备 export TMPDIR=/home/db/oracle/xtts perl xttdriver.pl --backup 传输全备 scp backup/* root@192.168.66.144:/home/db/oracle/backup scp xtts/res.txt root.

u010719917的专栏 312

Oracle单实例数据库Windows环境跨平台迁移到Linux

Oracle数据库Windows单实例环境跨平台迁移到Linux #一、Active database duplicate 场景:windows平台数据库迁移到Linux,备份不落地通过网络完成数据库RMAN的还原 源数据库 ip:192.168.212.247 db_name:orcl version:11.2.0.4 platform:Windows Server 2008R2 目标数据库 i...

Kay的博客 2275

Bytebase数据迁移跨平台数据库迁移工具

Bytebase数据迁移跨平台数据库迁移工具 【免费下载链接】bytebase World's most advanced database DevOps and CI/CD for Developer, DBA and Platform Engineering teams. The GitLab for databa...

gitblog_00457的博客 875

利用RMAN Convert database特性进行跨平台迁移数据

转载学习在Oracle10g中,不仅可以利用跨平台传输表空间的新特性在异构平台数据库之间迁移数据,在特定条件下,还可以利用Convert database特性进行整个数据库跨平台迁移。如果要在10G中进行全库跨平台迁移,那么...

297

xtts 跨平台迁移数据库

当源库与目标库期望接近时,DBA决定完成迁移,则将所有需要XTTS迁移的对象设置为只读模式,直到最后一个1级增量备份被捕获并传输到目标库,然后应用于0级备份,在做最后一次恢复。1、源和目标库创建数据库对应的目录,目标库创建公共 DBLink 使用 system 用户。3、编辑 xtts.properties 配置文件。xtts 跨平台迁移数据库

Ahern_的博客 436
上一篇: DB2控制中心菜单中文乱码问题
下一篇: 实用的技术帖子(方便查用)
congcan0970
博客等级 码龄10年 0粉丝 0原创
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值