ORACLE 10.2.0.5 RAC升级到11.2.0.3 (三)DATABASE升级

ORACLE 10.2.0.5 RAC升级到11.2.0.3 (一) 集群软件升级

ORACLE 10.2.0.5 RAC升级到11.2.0.3 (二)将OCR和VOTEING DISK迁移到ASM

image

image

这儿选择Upgrade an existing database.

image

image

image

image

image

image

image

image

image

[root@rac1 ~]# /oracle/app/oracle/product/11.2.0/db_1/root.sh
Performing root user operation for Oracle 11g

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME=  /oracle/app/oracle/product/11.2.0/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Finished product-specific root actions.

[root@rac2 ~]# /oracle/app/oracle/product/11.2.0/db_1/root.sh
Performing root user operation for Oracle 11g

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME=  /oracle/app/oracle/product/11.2.0/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Finished product-specific root actions.

image

image

image

image

image

image

image

image

image

image

image

升级完成后进行校验

[oracle@rac1 ~]$ cp .bash_profile  .10bash_profile
[oracle@rac1 ~]$ cp .11bash_profile  .bash_profile
[oracle@rac1 ~]$ source .bash_profile
[oracle@rac1 ~]$ grid_env
[oracle@rac1 ~]$ crs_stat -t -v
Name           Type           R/RA   F/FT   Target    State     Host
----------------------------------------------------------------------
ora.DATA.dg    ora....up.type 0/5    0/     ONLINE    ONLINE    rac1
ora....ER.lsnr ora....er.type 0/5    0/     ONLINE    ONLINE    rac1
ora....N1.lsnr ora....er.type 0/5    0/0    ONLINE    ONLINE    rac1
ora....N2.lsnr ora....er.type 0/5    0/0    ONLINE    ONLINE    rac2
ora....N3.lsnr ora....er.type 0/5    0/0    ONLINE    ONLINE    rac2
ora.asm        ora.asm.type   0/5    0/     ONLINE    ONLINE    rac1
ora.cvu        ora.cvu.type   0/5    0/0    ONLINE    ONLINE    rac2
ora.gsd        ora.gsd.type   0/5    0/     OFFLINE   OFFLINE
ora....network ora....rk.type 0/5    0/     ONLINE    ONLINE    rac1
ora.oc4j       ora.oc4j.type  0/1    0/2    ONLINE    ONLINE    rac2
ora.ons        ora.ons.type   0/3    0/     ONLINE    ONLINE    rac1
ora....SM1.asm application    0/5    0/0    ONLINE    ONLINE    rac1
ora....C1.lsnr application    0/5    0/0    ONLINE    ONLINE    rac1
ora.rac1.gsd   application    0/5    0/0    OFFLINE   OFFLINE
ora.rac1.ons   application    0/3    0/0    ONLINE    ONLINE    rac1
ora.rac1.vip   ora....t1.type 0/0    0/0    ONLINE    ONLINE    rac1
ora....SM2.asm application    0/5    0/0    ONLINE    ONLINE    rac2
ora....C2.lsnr application    0/5    0/0    ONLINE    ONLINE    rac2
ora.rac2.gsd   application    0/5    0/0    OFFLINE   OFFLINE
ora.rac2.ons   application    0/3    0/0    ONLINE    ONLINE    rac2
ora.rac2.vip   ora....t1.type 0/0    0/0    ONLINE    ONLINE    rac2
ora.racdb.db   ora....se.type 0/2    0/1    ONLINE    ONLINE    rac1
ora....ry.acfs ora....fs.type 0/5    0/     ONLINE    ONLINE    rac1
ora.scan1.vip  ora....ip.type 0/0    0/0    ONLINE    ONLINE    rac1
ora.scan2.vip  ora....ip.type 0/0    0/0    ONLINE    ONLINE    rac2
ora.scan3.vip  ora....ip.type 0/0    0/0    ONLINE    ONLINE    rac2

[oracle@rac1 ~]$ crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [11.2.0.3.0]
[oracle@rac1 ~]$ crsctl query crs releaseversion
Oracle High Availability Services release version on the local node is [11.2.0.3.0]
[oracle@rac1 ~]$ crsctl query crs softwareversion rac1
Oracle Clusterware version on node [rac1] is [11.2.0.3.0]
[oracle@rac1 ~]$ crsctl query crs softwareversion rac2
Oracle Clusterware version on node [rac2] is [11.2.0.3.0]

SQL> select * from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE    11.2.0.3.0      Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production

SQL> select COMP_NAME,VERSION,STATUS from dba_registry;

COMP_NAME                                                    VERSION                        STATUS
------------------------------------------------------------ ------------------------------ ----------------------
Oracle Enterprise Manager                                    11.2.0.3.0                     VALID
OLAP Catalog                                                 11.2.0.3.0                     VALID
Spatial                                                      11.2.0.3.0                     VALID
Oracle Multimedia                                            11.2.0.3.0                     VALID
Oracle XML Database                                          11.2.0.3.0                     VALID
Oracle Text                                                  11.2.0.3.0                     VALID
Oracle Data Mining                                           11.2.0.3.0                     VALID
Oracle Expression Filter                                     11.2.0.3.0                     VALID
Oracle Rules Manager                                         11.2.0.3.0                     VALID
Oracle Workspace Manager                                     11.2.0.3.0                     VALID
Oracle Database Catalog Views                                11.2.0.3.0                     VALID
Oracle Database Packages and Types                           11.2.0.3.0                     VALID
JServer JAVA Virtual Machine                                 11.2.0.3.0                     VALID
Oracle XDK                                                   11.2.0.3.0                     VALID
Oracle Database Java Packages                                11.2.0.3.0                     VALID
OLAP Analytic Workspace                                      11.2.0.3.0                     VALID
Oracle OLAP API                                              11.2.0.3.0                     VALID
Oracle Real Application Clusters                             11.2.0.3.0                     VALID

18 rows selected.

确保升级成功后,我们可以移除旧的ORACLE_HOME

[oracle@rac1 ContentsXML]$ pwd
/oracle/app/oracle/oraInventory/ContentsXML
[oracle@rac1 ContentsXML]$ more inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2011, Oracle. All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
<SAVED_WITH>11.2.0.3.0</SAVED_WITH>
<MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OraCrs10g_home" LOC="/oracle/app/oracle/product/10.2.0/crs_1" TYPE="O" IDX="1">
<NODE_LIST>
<NODE NAME="rac1"/>
<NODE NAME="rac2"/>
</NODE_LIST>
</HOME>
<HOME NAME="OraDb10g_home1" LOC="/oracle/app/oracle/product/10.2.0/db_1" TYPE="O" IDX="2">
<NODE_LIST>
<NODE NAME="rac1"/>
<NODE NAME="rac2"/>
</NODE_LIST>
</HOME>
<HOME NAME="Ora11g_gridinfrahome1" LOC="/oracle/app/11.2.0/grid" TYPE="O" IDX="3" CRS="true">
<NODE_LIST>
<NODE NAME="rac1"/>
<NODE NAME="rac2"/>
</NODE_LIST>
</HOME>
<HOME NAME="OraDb11g_home1" LOC="/oracle/app/oracle/product/11.2.0/db_1" TYPE="O" IDX="4">
<NODE_LIST>
<NODE NAME="rac1"/>
<NODE NAME="rac2"/>
</NODE_LIST>
</HOME>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>

[oracle@rac1 ContentsXML]$ /oracle/app/oracle/product/10.2.0/crs_1/oui/bin/runInstaller -detachHome -silent -invPtrLoc /etc/oraInst.loc  ORACLE_HOME="/oracle/app/oracle/product/10.2.0/crs_1"
Starting Oracle Universal Installer...

No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /oracle/app/oracle/oraInventory
'DetachHome' was successful.

[oracle@rac1 ContentsXML]$ /oracle/app/oracle/product/10.2.0/db_1/oui/bin/runInstaller -detachHome -silent -invPtrLoc /etc/oraInst.loc  ORACLE_HOME="/oracle/app/oracle/product/10.2.0/db_1"
Starting Oracle Universal Installer...

No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /oracle/app/oracle/oraInventory
'DetachHome' was successful.

此时我们可以看到inventory里面的内容,关于10g的显示REMOVED=T

[oracle@rac1 ContentsXML]$ more inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2010, Oracle. All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
<VERSION_INFO>
<SAVED_WITH>10.2.0.5.0</SAVED_WITH>
<MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="Ora11g_gridinfrahome1" LOC="/oracle/app/11.2.0/grid" TYPE="O" IDX="3" CRS="true">
<NODE_LIST>
<NODE NAME="rac1"/>
<NODE NAME="rac2"/>
</NODE_LIST>
</HOME>
<HOME NAME="OraDb11g_home1" LOC="/oracle/app/oracle/product/11.2.0/db_1" TYPE="O" IDX="4">
<NODE_LIST>
<NODE NAME="rac1"/>
<NODE NAME="rac2"/>
</NODE_LIST>
</HOME>
<HOME NAME="OraCrs10g_home" LOC="/oracle/app/oracle/product/10.2.0/crs_1" TYPE="O" IDX="1" REMOVED="T"/>
<HOME NAME="OraDb10g_home1" LOC="/oracle/app/oracle/product/10.2.0/db_1" TYPE="O" IDX="2" REMOVED="T"/>
</HOME_LIST>
</INVENTORY>

最后,我们可以直接删除10g安装目录

[oracle@rac1 ~]$ rm -rf /oracle/app/oracle/product/10.2.0/crs_1/
[oracle@rac1 ~]$ rm -rf /oracle/app/oracle/product/10.2.0/db_1/
分享到: 更多

Post a Comment

Your email is never published nor shared. Required fields are marked *