I 升级后修改/etc/oratab、oracle用户环境变量
将双节点的/etc/oratab文件中的下列
devdb:/u01/app/oracle/product/10.2.0/db_1:N
改为新的11g配置信息。
节点1改为:
devdb1:/u01/app/oracle/product/10.2.0/db_1:N
节点2 改为:
devdb2:/u01/app/oracle/product/10.2.0/db_1:N
修改双节点oracle用户的/home/oracle/.bash_profile配置文件:
节点1修改后:
节点2修改后:
J 修改cluster_database=true
关闭数据库,修改cluster_database=true之后,重启。
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE 11.2.0.4.0 Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
node1-> cat /u01/app/oracle/product/11.2.0/db_1/dbs/initdevdb1.ora
SPFILE='+DATA/devdb/spfiledevdb.ora'
node1->
节点1重启:
node1-> env|grep ORA
ORA_CRS_HOME=/u01/app/oracle/product/10.2.0/crs_1
ORACLE_SID=devdb1
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
node1-> sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Fri Dec 27 16:08:20 2013
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.
Total System Global Area 1219260416 bytes
Fixed Size 2252744 bytes
Variable Size 452984888 bytes
Database Buffers 754974720 bytes
Redo Buffers 9048064 bytes
Database mounted.
Database opened.
SQL> show parameter cluster_database
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
cluster_database boolean TRUE
cluster_database_instances integer 2
SQL>
节点2 启动数据库:
K 将数据库、实例、服务重新配置到Grid Infrastructure下管理
添加数据库:
node1-> srvctl config database -d devdb
PRCD-1120 : The resource for database devdb could not be found.
PRCR-1001 : Resource ora.devdb.db does not exist
node1->
添加:
node1-> srvctl add database -d devdb -o /u01/app/oracle/product/11.2.0/db_1 -c RAC -m oracleonlinux.cn -p +DATA/devdb/spfiledevdb.ora -y automatic -a data,fra
node1->
添加之后:
node1-> srvctl config database -d devdb
Database unique name: devdb
Database name:
Oracle home: /u01/app/oracle/product/11.2.0/db_1
Oracle user: oracle
Spfile: +DATA/devdb/spfiledevdb.ora
Domain: oracleonlinux.cn
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: devdb
Database instances:
Disk Groups: DATA,FRA
Mount point paths:
Services:
Type: RAC
Database is administrator managed
node1->
添加实例:
node1-> srvctl add instance -h
Adds a database instance configuration to the Oracle Clusterware.
Usage: srvctl add instance -d <db_unique_name> -i <inst_name> -n <node_name> [-f]
-d <db_unique_name> Unique name for the database
-i <inst> Instance name
-n <node_name> Node name
-f Force the add operation even though some resource(s) will be stopped
-h Print usage
node1-> srvctl add instance -d devdb -i devdb1 -n node1
node1-> srvctl add instance -d devdb -i devdb2 -n node2
添加服务:
L 验证
重启双节点OS:
启动服务:
node1-> srvctl start service -d devdb -s rac11g
node1-> crs_stat -t
看到此时SCAN IP浮动到节点2:
Q:如何处理gsd服务为OFFLINE的情况?
A:可以参照我之前的一篇文章:
http://www.oracleonlinux.cn/2012/03/how_to_start_11gr2_rac_oc4j_gsd_service/
最后,可以考虑将双节点上的原10g clusterware以及数据库软件删除掉!
此处不再给予赘述展示!!!!
如无特别说明,本站文章皆为原创,若要转载,务必请注明以下原文信息:
日志标题:《一步一步在Linux上升级10gR2 RAC到11gR2 RAC(8-完)》
日志链接:http://www.oracleonlinux.cn/2014/01/step-by-step-upgrade-10gr2rac-to-11gr2rac-on-linux-8/
博客名称:OracleOnLinux