Linux环境下CRS升级到10.2.0.4.2 Database升级到10.2.0.4.3

2.1 CRS安装
2.1.1 CRS安装(10.2.0.1.0)
2.1.2 升级CRS到10.2.0.4.0(patch 6810189)
2.1.3 升级CRS到10.2.0.4.2(patch 8705958)      
需要在所有节点都先应用patch 6880880(opatch补丁)
1. 备份原有的Opatch目录。
2. unzip p6880880_10204_.zip补丁到$ORACLE_HOME目录下。
应用8705958补丁(每个节点都需要执行)
###########################################################################
#
#  1. Verify that the Oracle Inventory is properly configured.
#
#
#  As the Oracle Clusterware (CRS) software owner:
#
#  % opatch lsinventory -detail -oh
#
#
#  As the RDBMS server owner:
#
#  % opatch lsinventory -detail -oh
#
#
#  This should list the components the list of nodes.
#
#  If the Oracle inventory is not setup correctly this utility will
#  fail. 
#
###########################################################################
#
#  2. Unzip the PSE container file
#
#  % unzip 8705958.zip
#
###########################################################################
#
# 3.1 In configuration A, shut down the RDBMS and ASM instances, listeners 
#     and nodeapps on all nodes before shutting down the CRS daemons on 
#     all nodes. Note that these setps must be run in the order specified.
#
#     3.1.1  To shutdown RDBMS on all nodes run the following command: 
#
#       % $ORACLE_HOME/bin/srvctl stop database -d dbname      
#
#     3.1.2  To shutdown ASM instances run the following command on each node:
#
#       % $ORACLE_HOME/bin/srvctl stop asm -n
#
#     3.1.3  To shutdown nodeapps run the following comand on each node:
#
#       % $ORACLE_HOME/bin/srvctl stop nodeapps -n
#
#     3.1.4  Now shutdown CRS daemons on each node by running as root:
#
#       crsctl stop crs
#
#     3.1.6 If the oprocd is running, as root stop the oprocd
#
#       % $ORA_CRS_HOME/bin/oprocd stop
#     
#  3.2 In configuration B, shut down the RDBMS and ASM instances, listeners
#      and nodeapps followed by CRS daemons on the local node. 
#
#     3.2.1  To shutdown RDBMS instance on the local node run the
#            following command:
#
#       % $ORACLE_HOME/bin/srvctl stop instance -d dbname -i instance_name
#
#       Then run commands (3.1.2) through (3.1.4) mentioned above. Finally
#       as root, issue the following command to stop the CRS daemons.
#
#       crsctl stop crs
#
###########################################################################
#
#  4.  Prior to applying this part of the fix, you must invoke this script
#  as root to unlock protected files.
#  
#   is the software installer/owner for the CRS Home.
#
#  # custom/scripts/prerootpatch.sh -crshome -crsuser
#
#  Note: In configuration A, invoke this only on one node.
#
#
###########################################################################
#
#  5. Now invoke an additional script. as the crs software installer/owner.
#  This script. will save important configuration settings.
#
#  % custom/scripts/prepatch.sh -crshome
#
#  Note: In configuration A, invoke this only on one node.
#    Alert: The RDBMS portion can only be applied to an RDBMS home that
#          has been upgraded to 10.2.0.4.0.
#
#  If the CRS Version and RDBMS version are the same, 
#  as the RDBMS software owner;
#
#  % custom/server/8705958/custom/scripts/prepatch.sh -dbhome
#
###########################################################################
#
#  6. Patch the Files
#
#    6.1 Patch the CRS home files
#
#    After unlocking any protected files and saving configuration settings
#    you are now ready to run opatch using the following command.
#
#    As the Oracle Clusterware (CRS) software owner,
#    from the directory where the patch was unzipped;
#
#    % opatch napply -local -oh -id 8705958
#
#    Note: In configuration A, invoke this only on one node.
#
#
#    6.2 Patch the RDBMS home files.
#
#    Alert: The RDBMS portion can only be applied to an RDBMS home that
#          has been upgraded to 10.2.0.4.0.
#
#    For additional information please read Note.363254.1;
#    Applying one-off Oracle Clusterware patches in a mixed version home
#    environment
#
#    As the RDBMS software owner,
#    from the directory where the patch was unzipped;
#
#    % opatch napply custom/server/ -local -oh -id 8705958
#
#    Note: In configuration A, invoke this only on one node.
#
###########################################################################
#
#  7. Configure the HOME
#   
#    7.1 Configure the CRS HOME
#    After opatch completes, some configuration settings need to be applied
#    to the patched files. As the Oracle Clusterware (CRS) software owner 
#    execute the following; 
#
#    % custom/scripts/postpatch.sh -crshome
#
#    Note: In configuration A, invoke this only on one node.
#
#    7.2 Configure the RDBMS HOME
#    Alert: The RDBMS portion can only be applied to an RDBMS home that
#          has been upgraded to 10.2.0.4.0.
#
#    After opatch completes, some configuration settings need to be applied
#    to the patched files. As the RDBMS software owner execute the following; 
#
#    % custom/server/8705958/custom/scripts/postpatch.sh -dbhome
#
#    Note: In configuration A, invoke this only on one node.
#
###########################################################################
#
#  8. Now security settings need to be restored on the CRS Home. This script
#  will also restart the CRS daemons. Invoke this script. as root.
#
#  # custom/scripts/postrootpatch.sh -crshome
#
#  Note: This script. should only be invoked as part of the patch process.
#
#  Note: In configuration A, invoke this on each node. Do not invoke this
#        in parallel on two nodes.
#
###########################################################################
#
#  9. On success you can determine whether the patch has been installed by
#  using the following command;
#
#
#  As the Oracle Clusterware (CRS) software owner:
#
#  % opatch lsinventory -detail -oh
#
#
#  As the RDBMS server owner:
#
#  % opatch lsinventory -detail -oh
#
#
#  This should list the components the list of nodes.
#
2.2 Database安装
2.2.1 Database安装(10.2.0.1.0)
2.2.2 升级Database到10.2.0.4.0(patch 6810189)
2.2.3 升级Database到10.2.0.4.3(patch 9119284)   
需要在所有节点都先应用patch 6880880(opatch补丁)
1. 备份原有的Opatch目录。
2. unzip p6880880_10204_.zip补丁到$ORACLE_HOME目录下。
应用Patch 9119284补丁(应用前需要建立用户的有效性,自动完成其他节点补丁的升级)
1. 关闭ASM,database,nodeapps
2. 加入环境变量:export PATH=$PATH:/usr/bin:$ORACLE_HOME/OPatch/
3. unzip p9119284_10204_.zip
4. opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./9119284
5. 应用:
cd 9119284
opatch apply
6.
sh psu_root.sh(用root用户执行)。可以不必执行,不执行只是job scheuling system不能使用。
7. Loading Modified .sql Files into the Database
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> QUIT
8. 检查日志是否有报错:
catbundle_PSU__APPLY_.log
catbundle_PSU__GENERATE_.log
9. Recompiling Views in the Database
If you want to check whether view recompilation has already been performed for the database, execute the following statement.
SELECT * FROM registry$history where ID = '9119284';
(If the view recompilation has been performed, this statement returns one or more rows. If the view recompilation has not been performed, this statement returns no rows.)
1).Run the pre-check script. (so named because it was initially released in CPUJan2008), which reports the maximum number of views and objects that may be recompiled:
cd $ORACLE_HOME/cpu/view_recompile
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @recompile_precheck_jan2008cpu.sql
SQL> QUIT

The purpose of this step is to help you determine whether view recompilation should be done at the same time as the PSU install, or scheduled later.

2).If the database is not in a RAC environment, perform. this step and skip the next step. (If the database is in a RAC environment, go to the next step.)
Run the view recompilation script. Note that this script. is run with the database in upgrade mode, which restricts connections as SYSDBA.
cd $ORACLE_HOME/cpu/view_recompile
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> SHUTDOWN IMMEDIATE
SQL> STARTUP UPGRADE
SQL> @view_recompile_jan2008cpu.sql
SQL> SHUTDOWN;
SQL> STARTUP;
SQL> QUIT

3).If the database is in a RAC environment, run the view recompilation script. as follows. Note that this script. is run with the database in upgrade mode, which restricts connections as SYSDBA. Stop all instances except the one where the view recompilation is being executed.

cd $ORACLE_HOME/cpu/view_recompile
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP NOMOUNT
SQL> ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=spfile;
SQL> SHUTDOWN
SQL> STARTUP UPGRADE
SQL> @view_recompile_jan2008cpu.sql
SQL> SHUTDOWN;
SQL> STARTUP NOMOUNT;

Set the CLUSTER_DATABASE initialization parameter to TRUE:

SQL> ALTER SYSTEM SET CLUSTER_DATABASE=TRUE SCOPE=spfile;

Restart the database:

SQL> QUIT
cd $CRS_HOME/bin
srvctl start database -d

4).Check the log file for any errors. The log file is in the current directory and is named: vcomp__.log

5).If any invalid objects were reported, run the utlrp.sql script. as follows:
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23135684/viewspace-660024/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/23135684/viewspace-660024/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值