Linux環境下CRS升級到10.2.0.4.2 Database升級到10.2.0.4.3

尛樣兒發表於2010-04-17
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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章