赞
踩
本次升级为 Linux 异机同平台跨版本,由Oracle 11G 两节点RAC集群迁移并升级至Oracle 19C 两节点RAC集群。
源端操作系统:Red Hat Enterprise Linux Server release 6.10
源端数据库版本:Oracle 11.2.0.4 RAC
目标端操作系统:Red Hat Enterprise Linux Server release 7.9
目标断数据库版本: Oracle 19.16 RAC
过程略...........
过程略...........
环境变量截图:
配置DG,用Oracle 11.2.0.4的HOME去进行同步
过程略...........
select max(sequence#) from v$archived_log;
select max(sequence#) from v$archived_log where applied='YES';
select max(sequence#) from v$archived_log;
select max(sequence#) from v$archived_log where applied='YES';
ps -ef|grep -v grep|grep LOCAL=NO|awk '{print $2}'|xargs kill -9
alter system switch logfile;
crsctl stop has -f
alter database recover managed standby database cancel;
alter database recover managed standby database finish force;
alter database active physical standby database;
alter database open;
startup mount
alter system set "_system_trig_enabled"=false scope=memory;
alter system enable restricted session;
alter database open;
@?/javavm/install/rmjvm.sql
shutdown immediate
startup mount
alter system set "_system_trig_enabled"=false scope=memory;
alter database open;
@?/javavm/install/initjvm.sql
@?/rdbms/admin/utlrp.sql
SET SERVEROUTPUT ON;
EXECUTE DBMS_PREUP.INVALID_OBJECTS;
PURGE dba_recyclebin;
cp /u01/app/oracle/product/19.3.0/db_1/rdbms/admin/olspreupgrade.sql /u01/app/oracle/product/11.2.0/rdbms/admin/olspreupgrade.sql
sqlplus / as sysdba
@?/rdbms/admin/olspreupgrade.sql
cp /u01/app/oracle/product/19.3.0/db_1/rdbms/admin/emremove.sql /u01/app/oracle/product/11.2.0/rdbms/admin/emremove.sql
sqlplus / as sysdba
@?/rdbms/admin/emremove.sql
Cp /u01/app/oracle/product/19.3.0/db_1/olap/admin/catnoamd.sql $ORACLE_HOME/olap/admin/catnoamd.sql
sqlplus / as sysdba
@?/olap/admin/catnoamd.sql
@?/rdbms/admin/catnoexf.sql
--查看隐含参数_optimizer_cartesian_enabled,确保设置为TRUE
SELECT name,description from SYS.V$PARAMETER WHERE name LIKE '\_%' ESCAPE '\';
alter system set "_optimizer_cartesian_enabled"=TRUE;
alter system set cluster_database=false scope=spfile;
shutdown immediate
修改Oracle_home 环境变量指向19C的ORACLE_HOME
startup upgrade
接下来就是升级数据字典----- @?/rdbms/admin/catupgrd.sql
按照输出的提示进行升级
cd $ORACLE_HOME/rdbms/admin
$ORACLE_HOME/perl/bin/perl catctl.pl -n 24 catupgrd.sql ---并行升级
要是手动升级数据库,但是未运行脚本catuppst.sql脚本,则数据库的性能随着时间下降。
$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -n 24 -e -b catuppst -d "." catuppst.sql
$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -n 24 -e -b utlrp -d "." utlrp.sql
Startup
@?/rdbms/admin/utltz_upg_check.sql
@?/rdbms/admin/utltz_upg_apply.sql
alter system set resource_manager_plan=default_plan;
grant administer database trigger to SYS;
grant administer database trigger to system;
alter system set cluster_database=true scope=spfile;
Export ORACLE_HOME= /u01/app/oracle/product/11.2.0
srvctl remove database -d hisdb
注册实例前,所有节点的ORACLE_HOME需改为19C的HOME目录
Export ORACLE_HOME= /u01/app/oracle/product/19.3.0/db_1
srvctl add database -d hisdb -o $ORACLE_HOME
srvctl add instance -d hisdb -i hisdb1 -n his01
srvctl add instance -d hisdb -i hisdb2 -n his02
启动前修改spfile文件,拷贝inithisdb.ora及orapwhisdb.ora文件至2节点
添加如下参数:
hisdb2.instance_number=2
hisdb2.thread=2
hisdb2.undo_tablespace='UNDOTBS2'
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。