Oracle数据库迁移升级项目102030(HP-UX)-)102056(SunOS)

浏览:
字体:
发布时间:2013-12-12 14:50:53
来源:
netslife迁移升级项目10.2.0.3.0(HP-UX IA (64-bit)10.2.0.5.6 Solaris[tm] OE (64-bit)
G2BH8060, odsz10g sid: hd02ntlfg4as8031, od1ntlf ,sid:d1ntlf
1.源端做convert databaseshut immediatestartup mountalter database open read only;
set serveroutput ondeclaredb_ready boolean;begindb_ready := dbms_tdb.check_db('Solaris[tm] OE (64-bit)',dbms_tdb.skip_readonly);end;/
set serveroutput ondeclareexternal boolean;beginexternal := dbms_tdb.check_external;end;/ rman target / << EOF >/paic/hd02ntlf/datatmp/fwy/fwy.log 2>&1CONVERT DATABASE NEW DATABASE 'newdb'to platform 'Solaris[tm] OE (64-bit)'db_file_name_convert '/paic/g2bh8060/dev/xqd/oradata/hd02ntlf/' '/paic/hd02ntlf/datatmp/fwy/';EOF
中途报错,是因为undo表空间有坏块。convert database报错因为有坏块.mht这里得出的结论是,做rman convert前可以先全部dbv检查一下。--dbv.sh--select 'dbv file='''||file_name||''' feedback=1000000 ' from dba_data_files;nohup sh dbv.sh>dbv.out 2>&1 &


2.目标端克隆软件102056
$ORACLE_HOME/oui/bin/runInstaller -detachHome -invPtrLoc /paic/d1ntlf/rdbms/oracle/product/10.2.0/oraInst.loc ORACLE_HOME=/paic/d1ntlf/rdbms/oracle/product/10.2.0
vi install.sh$ORACLE_HOME/oui/bin/runInstaller -invPtrLoc /paic/d1ntlf/rdbms/oracle/product/10.2.0/oraInst.loc /-silent -clone ORACLE_HOME="/paic/d1ntlf/rdbms/oracle/product/10.2.0" /ORACLE_HOME_NAME="home102041"


select 'alter database rename file '||chr(39)||file_name||chr(39)||' to '||chr(39)||substr(file_name,instr(file_name,'/',-1,1))||chr(39) from dba_data_files;
将数据文件都传到目标端,控制文件传一个就可以。临时文件不用传,redo log可以传可以不传,传就方便点,不传的话,后期要创建新的redo log 文件。
--因为数据库是nomount状态,不能configure channel来配置并行,所以要在转换的临时分配channel既然convert database因不明原因失败,我就将dbf文件都传到临时卷上。再将临时卷挂到目标端,然后convert datafile。此时要用root修改属主与权限。--因为数据库是nomount状态,不能configure channel来配置并行,所以要在转换的临时分配channel
数据库启动到nomount状态
--1.sh--rman target / <<EOF >1.log 2>&1run{allocate channel c1 type disk;allocate channel c2 type disk;allocate channel c3 type disk;allocate channel c4 type disk;allocate channel c5 type disk;allocate channel c6 type disk;allocate channel c7 type disk;allocate channel c8 type disk;convert datafile '/paic/hd02ntlf/datatmp/fwy/arcdata.dbf','/paic/hd02ntlf/datatmp/fwy/cchdata01.dbf','/paic/hd02ntlf/datatmp/fwy/ccodata01.dbf','/paic/hd02ntlf/datatmp/fwy/dbadata01.dbf','/paic/hd02ntlf/datatmp/fwy/dmkbakdata01.dbf','/paic/hd02ntlf/datatmp/fwy/fwy01.dbf','/paic/hd02ntlf/datatmp/fwy/iflyteksadata01.dbf','/paic/hd02ntlf/datatmp/fwy/INSTMRdata01.dbf','/paic/hd02ntlf/datatmp/fwy/netsmisdata01.dbf','/paic/hd02ntlf/datatmp/fwy/rbsdata01.dbf','/paic/hd02ntlf/datatmp/fwy/rbsdata02.dbf','/paic/hd02ntlf/datatmp/fwy/rbsdata03.dbf','/paic/hd02ntlf/datatmp/fwy/sysaux01.dbf','/paic/hd02ntlf/datatmp/fwy/system01.dbf','/paic/hd02ntlf/datatmp/fwy/tmrlifeadmdata01.dbf','/paic/hd02ntlf/datatmp/fwy/tmrlifeadmdata02.dbf','/paic/hd02ntlf/datatmp/fwy/tmrlifeadmidx01.dbf','/paic/hd02ntlf/datatmp/fwy/tmrlifedata01.dbf','/paic/hd02ntlf/datatmp/fwy/tmrlifedata02.dbf','/paic/hd02ntlf/datatmp/fwy/tmrlifedata03.dbf','/paic/hd02ntlf/datatmp/fwy/tmrlifedata04.dbf','/paic/hd02ntlf/datatmp/fwy/tmrlifedata05.dbf','/paic/hd02ntlf/datatmp/fwy/tmrlifedata06.dbf','/paic/hd02ntlf/datatmp/fwy/tmrlifedata07.dbf','/paic/hd02ntlf/datatmp/fwy/tmrlifedata08.dbf','/paic/hd02ntlf/datatmp/fwy/tmrlifedata09.dbf'to PLATFORM="Solaris[tm] OE (64-bit)"FROM PLATFORM="HP-UX IA (64-bit)"DB_FILE_NAME_CONVERT='/paic/hd02ntlf/datatmp/fwy','/paic/d1ntlf/data01/oradata';release channel c1;release channel c2;release channel c3;release channel c4;release channel c5;release channel c6;release channel c7;release channel c8;}EOF
nohup sh 1.sh &
--vi 2.sh--rman target / <<EOF >2.log 2>&1run{allocate channel c1 type disk;allocate channel c2 type disk;allocate channel c3 type disk;allocate channel c4 type disk;allocate channel c5 type disk;allocate channel c6 type disk;allocate channel c7 type disk;allocate channel c8 type disk;convert datafile'/paic/hd02ntlf/datatmp/fwy/tmrlifedata10.dbf','/paic/hd02ntlf/datatmp/fwy/tmrlifedata11.dbf','/paic/hd02ntlf/datatmp/fwy/tmrlifedata12.dbf','/paic/hd02ntlf/datatmp/fwy/tmrlifedata13.dbf','/paic/hd02ntlf/datatmp/fwy/tmrlifedata14.dbf','/paic/hd02ntlf/datatmp/fwy/tmrlifedata15.dbf','/paic/hd02ntlf/datatmp/fwy/tmrlifedata16.dbf','/paic/hd02ntlf/datatmp/fwy/tmrlifedata17.dbf'to PLATFORM="Solaris[tm] OE (64-bit)"FROM PLATFORM="HP-UX IA (64-bit)"DB_FILE_NAME_CONVERT='/paic/hd02ntlf/datatmp/fwy','/paic/d1ntlf/data02/oradata';release channel c1;release channel c2;release channel c3;release channel c4;release channel c5;release channel c6;release channel c7;release channel c8;}EOFnohup sh 2.sh &对于SUN平台,后台跑起就exit这个主机,然后重启登陆,此时ctrl+c才不会影响此次任务。不然ctrl+c就会将当前会话发起的任务都退出掉。
--3.sh--rman target / <<EOF >3.log 2>&1run{allocate channel c1 type disk;allocate channel c2 type disk;allocate channel c3 type disk;allocate channel c4 type disk;allocate channel c5 type disk;allocate channel c6 type disk;allocate channel c7 type disk;allocate channel c8 type disk;convert datafile '/paic/hd02ntlf/datatmp/fwy/tmrlifedata18.dbf','/paic/hd02ntlf/datatmp/fwy/tmrlifedata19.dbf','/paic/hd02ntlf/datatmp/fwy/tmrlifedata20.dbf','/paic/hd02ntlf/datatmp/fwy/tmrlifedata21.dbf','/paic/hd02ntlf/datatmp/fwy/tmrlifedata22.dbf','/paic/hd02ntlf/datatmp/fwy/tmrlifedata23.dbf'to PLATFORM="Solaris[tm] OE (64-bit)"FROM PLATFORM="HP-UX IA (64-bit)"DB_FILE_NAME_CONVERT='/paic/hd02ntlf/datatmp/fwy','/paic/d1ntlf/data03/oradata';release channel c1;release channel c2;release channel c3;release channel c4;release channel c5;release channel c6;release channel c7;release channel c8;}EOF
nohup sh 3.sh &
--4.sh--rman target / <<EOF >4.log 2>&1run{allocate channel c1 type disk;allocate channel c2 type disk;allocate channel c3 type disk;allocate channel c4 type disk;allocate channel c5 type disk;allocate channel c6 type disk;allocate channel c7 type disk;allocate channel c8 type disk;convert datafile '/paic/hd02ntlf/datatmp/fwy/tmrlifedata24.dbf','/paic/hd02ntlf/datatmp/fwy/tmrlifedata25.dbf','/paic/hd02ntlf/datatmp/fwy/tmrlifedata26.dbf','/paic/hd02ntlf/datatmp/fwy/tmrlifedata27.dbf','/paic/hd02ntlf/datatmp/fwy/undotbs2_01.dbf','/paic/hd02ntlf/datatmp/fwy/users01.dbf','/paic/hd02ntlf/datatmp/fwy/workarea01.dbf'to PLATFORM="Solaris[tm] OE (64-bit)"FROM PLATFORM="HP-UX IA (64-bit)"DB_FILE_NAME_CONVERT='/paic/hd02ntlf/datatmp/fwy','/paic/d1ntlf/data04/oradata';release channel c1;release channel c2;release channel c3;release channel c4;release channel c5;release channel c6;release channel c7;release channel c8;}EOF
nohup sh 4.sh &
将参数文件编辑好startup nomount;将控制文件复制到指定的路径下。alter database mount;
第一个卷rename file.txt第二个卷rename file.txt新建文本文档.txt新建文本文档.txtshut immediate;startup nomount;mv旧控制文件。重建控制文件。(将建temp脚本取出)alter database open resetlogs upgrade;将控制文件加上temp文件。检查升级前提条件是否满足@/rdbms/admin/utlu102i.sql升级 @?/rdbms/admin/catupgrd.sqlshut immediatestartup@?/rdbms/admin/utlrp.sql编译失效对象
之前修改控制文件忘记改db_name了,后面要记得重建控制文件改过来。g4as8031,od1ntlf ,sid:d1ntlf

我发现升级完以后,无论怎么查版本号,都是102050.原来是需要打PSU @catbundle.sql psu apply ,才能把版本号弄到102056.

apply日志.txt后来驻场何工帮我看了日志,发现是temp表空间不够,加了表空间再apply就成功了。这件事情说明,对于日志的输出,就算很长,也得仔细看,从头看到尾,这样才算是尽力了。当然也说明了,多点问身边的人,充分调动资源,也是很重要的解决问题的方法。





>更多相关文章
24小时热门资讯
24小时回复排行
资讯 | QQ | 安全 | 编程 | 数据库 | 系统 | 网络 | 考试 | 站长 | 关于东联 | 安全雇佣 | 搞笑视频大全 | 微信学院 | 视频课程 |
关于我们 | 联系我们 | 广告服务 | 免责申明 | 作品发布 | 网站地图 | 官方微博 | 技术培训
Copyright © 2007 - 2024 Vm888.Com. All Rights Reserved
粤公网安备 44060402001498号 粤ICP备19097316号 请遵循相关法律法规
');})();