Oracle 11g跨平台恢复,Oracle 11g 数据库跨平台迁移

本文详细介绍了如何进行Oracle11g数据库从RedHatEnterpriseLinux6.5迁移到Windows7ServicePack1的过程,包括源端数据库的用户创建、数据导出,以及目标端的数据导入和验证。通过全库导出和导入,确保了源端和目标端数据的一致性。
摘要由CSDN通过智能技术生成

Oracle 11g 数据库跨平台迁移

Oracle 11g 数据库跨平台迁移

Oracle 11g 数据库跨平台迁移

实验环境

源端系统版本:Red Hat Enterprise Linux 6.5

源端数据库版本:Oracle 11.2.0.4

目标端系统版本:Windows 7 Service Pack1

目标端数据库版本:Oracle 11.2.0.4

源端数据库准备

1.创建测试用户并赋予权限

create user test identified by oracle;

grant dba to test;

grant resource,connect to test;

grant select any table to test;

9ca9f4b8e0b46ada9694bd9feb765a8b.png

2.源端测试用户下创建测试表

(1)创建测试表

create table test as select * from sys.test;

(sys用户下存在测试表test,数据量约为25万条)

(2)确认表已创建成功

select table_name from user_tables;

(3)统计表的数据量

select count(*) from test;

88936f0fa0a7cd7538c2edb0d02227ac.png

3.查询源端数据库现有用户下的表和数据量

(1)select table_name from user_tables;

(2)select count(*) from emp2;

e12e5b9b17fe2feeb2b62ba506fc50f9.png

源端测试环境准备完毕!

1.创建测试用户并赋予权限

create user test identified by oracle;

grant dba to test;

grant resource,connect to test;

grant select any table to test;

1.源端数据库数据导出(全库导出)

(1)创建数据导出目录Directory:

create or replace directory DUMP_1 as '/home/oracle/backup';

(2)给创建的数据导出目录赋权:

grant read, write on directory DUMP_1 to system;

(3)进行源端数据库数据导出

expdp system/oracle directory=DUMP_1 dumpfile=exp2.dmp logfile=exp2.log full=y;

2.目标端数据库数据全库导入

(1)建立导入数据存放目录:

位置:D:\backup

(2)创建数据导入目录Directory:

create or replace directory DUMP_1 as 'D:\backup';

(3)给创建的数据导出目录赋权:

grant read, write on directory DUMP_1 to system;

(4)数据文件拷贝:

将源端导出的数据文件拷贝到目标端建立的数据存放目录D:\backup

(5)将源端数据导入数据库:

impdp system/[email protected] directory=DUMP_1 dumpfile=exp2.dmp full=y

注意:

1.在Windows环境dos命令窗口下,导入命令最后full=y后面不加分号,加了会报LRM-00105错

1.scott用户

scott用户下7张表全部导入

emp2表数据量14条,和源端数据一致

94f32fa158677bbfaaa4ea1d1311b22e.png

2.test用户

fbddd14dc946e184a9aedc384d52ea48.png

test用户下TEST表已经导入

test表数据量为259071和源端数据量一致

至此,整个Oracle数据库跨平台迁移完成!

Oracle 11g 数据库跨平台迁移相关教程

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值