upgrade 11.2.0.1 to 11.2.0.3 For RAC ON AIX
[plain]
最近为某银行升级了两套系统,在这里将升级步骤和注意事项整理一下。
[plain]
工作准备
[plain]
$ create pfile from spfile;
$ select file_id,file_name from dba_data_files;
$ alter database backup controlfile to trace as 'xxxx';
<<< 以上内容回退时可能会用到,建议执行后备份。
1. 升级前检查
1> oracle user
1>@utlu112i_5.sql <<< 注意下载最新脚本。对于手工升级来说,执行该脚本特别重要,若不执行后面执行升级脚本时会报错。
2>truncate table SYS.aud$;
3> Database contains INVALID objects prior to upgrade.
@utlrp.sql
4-> Your recycle bin contains 983 object(s).
PURGE DBA_RECYCLEBIN
5-> To gather dictionary statistics execute the following command
while connected as SYSDBA:
EXECUTE dbms_stats.gather_dictionary_stats;
6->
To view existing hidden parameters execute the following command
while connected AS SYSDBA:
SQL> SELECT name,description from SYS.V$PARAMETER WHERE name LIKE '\_%' ESCAPE '\';
_gc_policy_time
7->
To view existing non-default events execute the following commands
while connected AS SYSDBA:
Events:
SELECT (translate(value,chr(13)||chr(10),' ')) FROM sys.v$parameter2 WHERE UPPER(name) ='EVENT' AND isdefault='FALSE';
Trace Events:
SELECT (translate(value,chr(13)||chr(10),' ')) from sys.v$parameter2
WHERE UPPER(name) = '_TRACE_EVENTS' AND isdefault='FALSE'
2. 用RMAN备份数据库
3. 检查参数inventory配置
oraInventory目录下inventory.xml
grid@QAZWS0200:/home/db/grid/oraInventory/ContentsXML$ more inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2009, Oracle. All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
<SAVED_WITH>11.2.0.1.0</SAVED_WITH>
<MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="Ora11g_gridinfrahome1" LOC="/home/db/grid/product/11.2.0" TYPE="O" IDX="1" CRS="true
">
<NODE_LIST>
<NODE NAME="QAZWS0200"/>
<NODE NAME="QAZWS0210"/>
</NODE_LIST>
</HOME>
<HOME NAME="OraDb11g_home1" LOC="/home/db/oracle/product/11.2.0" TYPE="O" IDX="2">
<NODE_LIST>
<NODE NAME="QAZWS0200"/>
<NODE NAME="QAZWS0210"/>
</NODE_LIST>
</HOME>
</HOME_LIST>
</INVENTORY>
<<< 本次升级就遇到缺少CRS="true"的故障,
[plain]
[INS-40406] The installer detects no existing Oracle Grid Infrastructure software on the system
[plain]
后来通过$ORACLE_HOME/oui/installer.sh添加到OraDb11g_home1中问题解决。具体命令如下
[plain]
./runInstaller -updateNodeList ORACLE_HOME="/home/db/oracle/product/11.2.0" CRS=true -silent
[plain]
[plain]
升级时遇也遇到没有找到已存在的节点,也就是说:
[plain]
<HOME NAME="OraDb11g_home1" LOC="/home/db/oracle/product/11.2.0" TYPE="O" IDX="2"> <NODE_LIST> <NODE NAME="QAZWS0200"/> <NODE NAME="QAZWS0210"/> </NODE_LIST></HOME>
[plain]
中缺少NODE_LIST列表,通过下列命令添加:
[plain]
<pre class="plain" name="code">./runInstaller -updateNodeList CLUSTER_NODES=local_nodename,remote_nodename ORACLE_HOME="/home/db/oracle/product/11.2.0" CRS=true -silent</pre>
<pre></pre>
<pre class="plain" name="code">3. 备份目录
1->停止
查看状态
su - grid
su root
$crsctl stat res -t
在节点1
#crsctl stop crs
在节点2
#crsctl stop crs
检查
ps -ef |grep ora_
ps -ef |grep d.bin
2->备份软件目录
在节点1
#cd /home/db/grid/product
#tar cvf /home/ap/hdp/DBDIRBAK/grid_dir_bak.tar 11.2.0
#cd /home/db/oracle/product
#tar cvf