rman单实例数据向群集表空间的传输

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:25

1.将原库启动到read only,创建转换数据库脚本transport
(RMAN)CONVERT DATABASE NEW DATABASE 'orcl'
transport script 'd:\temp/transportscript'
to platform 'Linux x86 64-bit'
db_file_name_convert '+DATA/jfs/datafile/' 'd:\temp\'

2.删除新数据库上的数据文件、控制文件、日志文件,把旧库的数据文件传到新库上,创建pfile,修改cluster_database参数=false

3.新库数据库启动到nomount状态,恢复数据文件
startup nomount pfile='/home/oracle/orclpfile.txt'
CONVERT PARALLELISM 10
DATAFILE '/oradata/SYSTEM.262.849423333' FORMAT '+DATA/orcl/datafile/SYSTEM01.DBF'
DATAFILE '/oradata/UNDOTBS1.306.849423333' FORMAT '+DATA/orcl/datafile/UNDOTBS1.DBF'
DATAFILE '/oradata/USERS.305.849423333' FORMAT '+DATA/orcl/datafile/USERS01.DBF'
DATAFILE '/oradata/SYSAUX.261.849423333' FORMAT '+DATA/orcl/datafile/SYSAUX01.DBF'
;

4.创建控制文件
CREATE CONTROLFILE REUSE SET DATABASE "ORCL" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 2920
LOGFILE
GROUP 1 '+DATA/orcl/onlinelog/REDO01.LOG' SIZE 50M BLOCKSIZE 512,
GROUP 2 '+DATA/orcl/onlinelog/REDO02.LOG' SIZE 50M BLOCKSIZE 512,
GROUP 3 '+DATA/orcl/onlinelog/REDO03.LOG' SIZE 50M BLOCKSIZE 512
DATAFILE
'+DATA/ORCL/DATAFILE/SYSTEM01.DBF',
'+DATA/ORCL/DATAFILE/SYSAUX01.DBF',
'+DATA/ORCL/DATAFILE/UNDOTBS1.DBF',
'+DATA/ORCL/DATAFILE/USERS01.DBF',

CHARACTER SET ZHS16GBK
;

5.启动数据库(如果旧数据库版本比新数据库低就需要加UPGRADE)
ALTER DATABASE OPEN RESETLOGS UPGRADE;

6.创建临时文件
ALTER TABLESPACE TEMP ADD TEMPFILE '+data/orcl/tempfile/TEMP01.DBF' SIZE 30408704 REUSE AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M;
CREATE UNDO TABLESPACE UNDOTBS2 DATAFILE '+DATA/orcl/datafile/undotbs2.dbf' SIZE 500M AUTOEXTEND ON;

7.执行升级脚本(升级数据字典)
@@?/rdbms/admin/utlirp.sql

8.升级到11.2.0.4
@@?/rdbms/admin/catupgrd.sql

9.重启数据库(启动到open状态)

10.编译无效对象
@@?/rdbms/admin/utlrp.sql

11.添加REDO日志组
ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 4 '+DATA/orcl/onlinelog/redo04.log' SIZE 50M BLOCKSIZE 512;
ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 5 '+DATA/orcl/onlinelog/redo05.log' SIZE 50M BLOCKSIZE 512;
ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 6 '+DATA/orcl/onlinelog/redo06.log' SIZE 50M BLOCKSIZE 512;

12. 允许thread 2日志组
alter database enable thread 2;

13.重启数据库

14.修改归档路径
alter system set log_archive_dest_1='location=+arch';

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】