暂无图片
暂无图片
暂无图片
暂无图片
暂无图片
orale数据库xtts迁移 11.2.0.4到12.2.0.1.docx
106
6页
8次
2024-07-02
5墨值下载
xtts
迁移
11.2.0.4
12.2.0.1
以下实验使用
xs
版本:
rman_xttconvert_VER4.3
This article describes V4 XTTS procedures for Cross Platform Incremental Backup which is available for 11.2.0.4 and higher.
生产库打开块跟踪特性
如果源库是
11g
,需要先禁用延时段特性 不然
xtts
不会将空表导入目标库。
alter system set deferred_segment_creation=false sid='*'
scope=spfile;
首先在生产库上打开块跟踪功能。
alter database enable block change tracking using file
'/home/oracle/xtts/block_change_tracking.log';
--
源端建相关对象
create tablespace ts1 datafile '/u01/ts101.dbf' size 20m;
create tablespace ts2 datafile '/u01/ts201.dbf' size 20m;
create user xtts identified by xtts default tablespace ts1;
grant dba to xtts;
conn xtts/xtts
create table t_xtts (id number,name varchar2(10));
insert into t_xtts values (1,'xb');
commit;
--
在目标主机上安装数据库软件和实例,创建要导入表空间对象所在的用户。
create user xtts identified by xtts;
grant dba to xtts;
select PLATFORM_ID from v$DATABASE.PLATFORM_ID
--
源库
[oracle@begin100 ~]$ mkdir -p s_xtts
[oracle@begin100 ~]$ pwd
/home/oracle
拷贝程序到
s_xtts
xtt.properties
文件里
src_scratch_location
参数定义的备份目录
echo "export TMPDIR=/home/oracle/s_xtts" >>
/home/oracle/.bash_profile
source
--
目标库
[oracle@begin001 ~]$ mkdir -p d_xtts
[oracle@begin001 ~]$ pwd
/home/oracle
拷贝程序到
d_xtts
xtt.properties
文件里
dest_scratch_location
参数定义的备份目录
dest_datafile_location
参数定义的数据文件存放目录
echo "export TMPDIR=/home/oracle/d_xtts" >>/home/oracle/.bash_profile
source
--
源端执行
[oracle@begin100 s_xtts]$ pwd
/home/oracle/s_xtts
[oracle@begin100 s_xtts]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl
--backup
传输文件到目标端
src_scratch_location
下的备份文件到目标端的
dest_scratch_location
目录
源端
$TMPDIR
下的
res.txt
文件到目标端
$TMPDIR
--
目标端恢复数据文件
[oracle@begin001 d_xtts]$ pwd
/home/oracle/d_xtts
[oracle@begin001 d_xtts]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl
--restore
--
前滚阶段
在这个阶段过程中,在源端创建增量备份,然后传输到目标端,转换成目标端字节顺序格式,
然后应用于转换后的目标数据文件副本,进行前滚。这个阶段可能要重复执行多次,每次成功
的增量备份都将会使目标端文件越接近源端数据。
源端可以多次执行增量备份,而不需要等待其应用到目标端,备份文件和
res.txt
必须要拷
贝到目标端,然后才能执行–
restore
操作
--
对表空间进行增量备份
[oracle@begin100 s_xtts]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl
--backup
--
传输备份文件和
res.txt
到目标端
--
目标端应用增量备份
[oracle@begin001 d_xtts]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl
--restore
前滚的时候会连接到目标数据库,然后对每一个传输的数据文件进行增量备份的应用
重复上面几个步骤或进入下一阶段
这里有两个选择:
如果想让目标端文件与源端更加接近,那就多重复几次前滚阶段
否则则进入最后一次增量备份
--
最终增量备份
在这个阶段过程中,源端的数据文件会置为只读,通过应用最后一次的增量备份,目标端的数
据文件会跟源端保持一致。然后只需要将源端的对象元数据导出,再导入到目标端数据库,整
个操作完成之前,源端数据必须一致保持在只读状态。
修改数据文件为只读
alter tablespace TS1 read only;
alter tablespace TS2 read only;
最终增量备份
[oracle@begin100 s_xtts]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl
--backup
传输增量备份和
res.txt
--
应用最终增量备份
[oracle@begin001 d_xtts]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl
--restore
--
传输元数据
源端:
expdp system/oracle dumpfile=xttdump.dmp directory=EXPDPDIR
statistics=NONE transport_tablespaces=TS1,TS2 transport_full_check=y
logfile=xtts_export.log
目标端:
[oracle@begin001 temp]$ pwd
/u01/temp
impdp system/oracle dumpfile=xttdump.dmp directory=EXPDPDIR
transport_datafiles='/oradata/dest_datafiles/TS1_6.dbf','/oradata/des
t_datafiles/TS2_7.dbf'
--
验证数据
of 6
5墨值下载
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文档的来源(墨天轮),文档链接,文档作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。