130604RAC打补丁-成功从10.2.0.1升级到10.2.0.4

打开RAC后发现系统报错:ORA-00600: internal error code, arguments: [kffmAllocate_1], [26],[2], [], [],

 

查询metalink后发现是bug

 130604RAC打补丁-成功从10.2.0.1升级到10.2.0.4_第1张图片

 
ORA-600 [kffmallocate_1] [ID 406799.1]

 

 

需要打补丁10.2.0.3查询数据库版本:

Oracle Database 10g Enterprise EditionRelease 10.2.0.1.0 - 64bi

PL/SQL Release 10.2.0.1.0 - Production

CORE   10.2.0.1.0      Production

TNS for Linux: Version 10.2.0.1.0 -Production

NLSRTL Version 10.2.0.1.0 – Production

 

决定打补丁10.2.0.4,最新的是10.2.0.5

在metalink中输入10.2.0.4 patch set,找到文章


10.2.0.4 Patch Set - Availability and Known Issues [ID 555579.1]

 

130604RAC打补丁-成功从10.2.0.1升级到10.2.0.4_第2张图片

 

在该文章中找到补丁的下载地点,

Patch 6810189 released 17-MAR-2008

 

下载补丁,导入到DBP虚机,节点1;

解压缩补丁包,并且停数据库和CRS以及asm服务;

 

[root@dbp ~]# cd Desktop/
[root@dbp Desktop]# ls
p6810189_10204_Linux-x86-64.zip
[root@dbp Desktop]# mv p6810189_10204_Linux-x86-64.zip /home/oracle/
[root@dbp Desktop]# cd /home/oracle/
[root@dbp oracle]# ls
Desktop  ocrbak_votedisk  p6810189_10204_Linux-x86-64.zip
[root@dbp oracle]# chown oracle.dba p6810189_10204_Linux-x86-64.zip 
[root@dbp oracle]# su - oracle
[oracle@dbp ~]$ ls
Desktop  ocrbak_votedisk  p6810189_10204_Linux-x86-64.zip
[oracle@dbp ~]$ unzip p6810189_10204_Linux-x86-64.zip 


查询CRS和数据库的版本是否相同:

 

[oracle@dbp ~]$ crsctl query crs softwareversion
CRS software version on node [dbp] is [10.2.0.1.0]
[oracle@dbp ~]$ crsctl query crs activeversion  
CRS active version on the cluster is [10.2.0.1.0]


Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
PL/SQL Release 10.2.0.1.0 - Production
CORE    10.2.0.1.0      Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 – Production

 

将数据库和CRS、ASM停掉

[oracle@dbp ~]$ srvctl stop database -d wxxrdb
[oracle@dbp ~]$ srvctl stop nodeapps -n dbp
[oracle@dbp ~]$ srvctl stop nodeapps -n dbs
[oracle@dbp ~]$ crs_stat -t -v 
Name           Type           R/RA   F/FT   Target    State     Host        
----------------------------------------------------------------------
ora....SM1.asm application    0/5    0/0    ONLINE    ONLINE    dbp         
ora....BP.lsnr application    0/5    0/0    OFFLINE   OFFLINE               
ora.dbp.gsd    application    0/5    0/0    OFFLINE   OFFLINE               
ora.dbp.ons    application    0/3    0/0    OFFLINE   OFFLINE               
ora.dbp.vip    application    0/0    0/0    OFFLINE   OFFLINE               
ora....SM2.asm application    0/5    0/0    ONLINE    ONLINE    dbs         
ora....BS.lsnr application    0/5    0/0    OFFLINE   OFFLINE               
ora.dbs.gsd    application    0/5    0/0    OFFLINE   OFFLINE               
ora.dbs.ons    application    0/3    0/0    OFFLINE   OFFLINE               
ora.dbs.vip    application    0/0    0/0    OFFLINE   OFFLINE               
ora.wxxrdb.db  application    0/1    0/1    OFFLINE   OFFLINE               
ora....b1.inst application    0/5    0/0    OFFLINE   OFFLINE               
ora....b2.inst application    0/5    0/0    OFFLINE   OFFLINE               
[oracle@dbp ~]$ crs_stop -all
Attempting to stop `ora.dbp.ASM1.asm` on member `dbp`
Attempting to stop `ora.dbs.ASM2.asm` on member `dbs`
Stop of `ora.dbs.ASM2.asm` on member `dbs` succeeded.
Stop of `ora.dbp.ASM1.asm` on member `dbp` succeeded.


使用xmanager登陆DBP节点1,运行./runinstaller制定补丁程序,注意别忘记使用emctl stop dbconsole将em停掉,否则报java程序无法覆盖的错误(会在升级数据库的时候报错,升级CRS的时候不会报错);

在此贴出强行关闭em的调试命令行:

[root@dbp ~]# ps aux
USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0  4756  556 ?        S    08:31   0:00 init [5]         
root         2  0.0  0.0     0    0 ?        SN   08:31   0:00 [ksoftirqd/0]
root         3  0.0  0.0     0    0 ?        S<   08:31   0:06 [events/0]
root         4  0.0  0.0     0    0 ?        S<   08:31   0:00 [khelper]
root         5  0.0  0.0     0    0 ?        S<   08:31   0:00 [kacpid]
root        18  0.0  0.0     0    0 ?        S<   08:31   0:00 [kblockd/0]
root        19  0.0  0.0     0    0 ?        S    08:31   0:00 [khubd]
root        40  0.0  0.0     0    0 ?        S    08:31   0:00 [pdflush]
root        41  0.0  0.0     0    0 ?        S    08:31   0:03 [pdflush]
root        42  0.0  0.0     0    0 ?        S    08:31   0:00 [kswapd0]
root        43  0.0  0.0     0    0 ?        S<   08:31   0:00 [aio/0]
root       187  0.0  0.0     0    0 ?        S    08:31   0:00 [kseriod]
root       416  0.0  0.0     0    0 ?        S<   08:31   0:00 [ata/0]
root       417  0.0  0.0     0    0 ?        S<   08:31   0:00 [ata_aux]
root       419  0.0  0.0     0    0 ?        S    08:31   0:00 [scsi_eh_0]
root       420  0.0  0.0     0    0 ?        S    08:31   0:00 [scsi_eh_1]
root       421  0.0  0.0     0    0 ?        S    08:31   0:00 [scsi_eh_2]
root       422  0.0  0.0     0    0 ?        S    08:31   0:00 [scsi_eh_3]
root       456  0.0  0.0     0    0 ?        S    08:31   0:02 [kjournald]
root      1113  0.0  0.0     0    0 ?        S<   08:31   0:00 [kauditd]
root      3567  0.0  0.0  3608  456 ?        S/oracle/produc
oracle   15278  0.0  0.1 26032 5056 pts/1    S    14:46   0:00 /oracle/product/database/bin/emdctl status url http://dbp:1158/em/console/aboutApplication
root     15311  0.0  0.0  6324  476 ?        S    14:46   0:00 /bin/sleep 1
root     15312  0.0  0.0  5448  792 pts/1    R+   14:46   0:00 ps aux
oracle   20262  0.0  0.1  7752 6280 pts/1    S    08:41   0:00 /oracle/product/database/perl/bin/perl /oracle/product/database/bin/emwd.pl dbconsole /oracle/product/database/d
oracle   24145  0.0  0.4 67736 18200 pts/1   Sl   08:43   0:06 /oracle/product/database/bin/emagent
[root@dbp ~]# su - oracle
[oracle@dbp ~]$ emctl stop dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0  
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
http://dbp:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ... 
--- Failed to shutdown DBConsole Gracefully --- 
 failed.
[oracle@dbp ~]$ kill -9 15278
-bash: kill: (15278) - No such process
[oracle@dbp ~]$ ps aux
USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0  4756  556 ?        S    08:31   0:00 init [5]                                          
root         2  0.0  0.0     0    0 ?        SN   08:31   0:00 [ksoftirqd/0]
root         3  0.0  0.0     0    0 ?        S<   08:31   0:06 [events/0]
root         4  0.0  0.0     0    0 ?        S<   08:31   0:00 [khelper]
root         5  0.0  0.0     0    0 ?        S<   08:31   0:00 [kacpid]
root        18  0.0  0.0     0    0 ?        S<   08:31   0:00 [kblockd/0]
root        19  0.0  0.0     0    0 ?        S    08:31   0:00 [khubd]
root        40  0.0  0.0     0    0 ?        S    08:31   0:00 [pdflush]
root        41  0.0  0.0     0    0 ?        S    08:31   0:03 [pdflush]
root        42  0.0  0.0     0    0 ?        S    08:31   0:00 [kswapd0]
root        43  0.0  0.0     0    0 ?        S<   08:31   0:00 [aio/0]
root       187  0.0  0.0     0    0 ?        S    08:31   0:00 [kseriod]
root       416  0.0  0.0     0    0 ?        S<   08:31   0:00 [ata/0]
root       417  0.0  0.0     0    0 ?        S<   08:31   0:00 [ata_aux]
root       419  0.0  0.0     0    0 ?        S    08:31   0:00 [scsi_eh_0]
root       420  0.0  0.0     0    0 ?        S    08:31   0:00 [scsi_eh_1]
root       421  0.0  0.0     0    0 ?        S    08:31   0:00 [scsi_eh_2]
root       422  0.0  0.0     0    0 ?        S    08:31   0:00 [scsi_eh_3]
root       456  0.0  0.0     0    0 ?        S    08:31   0:02 [kjournald]
root      1113  0.0  0.0     0    0 ?        S<   08:31   0:00 [kauditd]
root      3567  0.0  0.0  3608  456 ?        S


 

130604RAC打补丁-成功从10.2.0.1升级到10.2.0.4_第3张图片

130604RAC打补丁-成功从10.2.0.1升级到10.2.0.4_第4张图片

 

注意此处选择CRS的地址,我们先安装CRS的补丁,patch set是一个整体,包括CRS的补丁和数据库的补丁:

130604RAC打补丁-成功从10.2.0.1升级到10.2.0.4_第5张图片

默认给整个cluster打补丁,两个节点都选;

130604RAC打补丁-成功从10.2.0.1升级到10.2.0.4_第6张图片

130604RAC打补丁-成功从10.2.0.1升级到10.2.0.4_第7张图片

130604RAC打补丁-成功从10.2.0.1升级到10.2.0.4_第8张图片

130604RAC打补丁-成功从10.2.0.1升级到10.2.0.4_第9张图片

只在DBP上运行orainstaRoot.sh,oraInventory1的解决权限问题;

 

130604RAC打补丁-成功从10.2.0.1升级到10.2.0.4_第10张图片

[root@dbp oracle]# /oracle/oraInventory1/orainstRoot.sh 
Changing permissions of /oracle/oraInventory1 to 770.
Changing groupname of /oracle/oraInventory1 to dba.
The execution of the script is complete

 

分别在节点1DBP和节点2DBS上运行命令crsctl stop crs和root102.sh

 

130604RAC打补丁-成功从10.2.0.1升级到10.2.0.4_第11张图片

DBP上操作
[root@dbp oracle]# /oracle/product/crs/bin/crsctl stop crs
Stopping resources.
Successfully stopped CRS resources 
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
[root@dbp oracle]# /oracle/product/crs/install/root102.sh 
Creating pre-patch directory for saving pre-patch clusterware files
Completed patching clusterware files to /oracle/product/crs
Relinking some shared libraries.
Relinking of patched files is complete.
WARNING: directory '/oracle/product' is not owned by root
WARNING: directory '/oracle' is not owned by root
Preparing to recopy patched init and RC scripts.
Recopying init and RC scripts.
Startup will be queued to init within 30 seconds.
Starting up the CRS daemons.
Waiting for the patched CRS daemons to start.
  This may take a while on some systems.
.
10204 patch successfully applied.
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node :   
node 1: dbp dbp-priv dbp
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
clscfg -upgrade completed successfully

[root@dbs ~]# /oracle/product/crs/bin/crsctl stop crs
Stopping resources.
Successfully stopped CRS resources 
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
[root@dbs ~]# /oracle/product/crs/install/root102.sh 
Creating pre-patch directory for saving pre-patch clusterware files
Completed patching clusterware files to /oracle/product/crs
Relinking some shared libraries.
Relinking of patched files is complete.
WARNING: directory '/oracle/product' is not owned by root
WARNING: directory '/oracle' is not owned by root
Preparing to recopy patched init and RC scripts.
Recopying init and RC scripts.
Startup will be queued to init within 30 seconds.
Starting up the CRS daemons.
Waiting for the patched CRS daemons to start.
  This may take a while on some systems.
.
10204 patch successfully applied.
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node :   
node 2: dbs dbs-priv dbs
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
clscfg -upgrade completed successfully

 

安装结束后,会将所有的服务默认都起来,通过CRS_STAT检查;

 

[root@dbs ~]# crs_stat -t -v
Name           Type           R/RA   F/FT   Target    State     Host        
----------------------------------------------------------------------
ora....SM1.asm application    0/5    0/0    ONLINE    ONLINE    dbp         
ora....BP.lsnr application    0/5    0/0    ONLINE    ONLINE    dbp         
ora.dbp.gsd    application    0/5    0/0    ONLINE    ONLINE    dbp         
ora.dbp.ons    application    0/3    0/0    ONLINE    ONLINE    dbp         
ora.dbp.vip    application    0/0    0/0    ONLINE    ONLINE    dbp         
ora....SM2.asm application    0/5    0/0    ONLINE    ONLINE    dbs         
ora....BS.lsnr application    0/5    0/0    ONLINE    ONLINE    dbs         
ora.dbs.gsd    application    0/5    0/0    ONLINE    OFFLINE               
ora.dbs.ons    application    0/3    0/0    ONLINE    ONLINE    dbs         
ora.dbs.vip    application    0/0    0/0    ONLINE    ONLINE    dbs         
ora.wxxrdb.db  application    0/1    0/1    ONLINE    ONLINE    dbp         
ora....b1.inst application    0/5    0/0    ONLINE    ONLINE    dbp         
ora....b2.inst application    0/5    0/0    ONLINE    OFFLINE               


将所有应用再次停掉;

[oracle@dbp ~]$ srvctl stop database -d wxxrdb
[oracle@dbp ~]$ srvctl stop nodeapps -n dbp
[oracle@dbp ~]$ srvctl stop nodeapps -n dbs
[oracle@dbp ~]$ crs_stop -all
Attempting to stop `ora.dbp.ASM1.asm` on member `dbp`
Attempting to stop `ora.dbs.ASM2.asm` on member `dbs`
Stop of `ora.dbs.ASM2.asm` on member `dbs` succeeded.
Stop of `ora.dbp.ASM1.asm` on member `dbp` succeeded.
[oracle@dbp ~]$ crs_stat -t -v
Name           Type           R/RA   F/FT   Target    State     Host        
----------------------------------------------------------------------
ora....SM1.asm application    0/5    0/0    OFFLINE   OFFLINE               
ora....BP.lsnr application    0/5    0/0    OFFLINE   OFFLINE               
ora.dbp.gsd    application    0/5    0/0    OFFLINE   OFFLINE               
ora.dbp.ons    application    0/3    0/0    OFFLINE   OFFLINE               
ora.dbp.vip    application    0/0    0/0    OFFLINE   OFFLINE               
ora....SM2.asm application    0/5    0/0    OFFLINE   OFFLINE               
ora....BS.lsnr application    0/5    0/0    OFFLINE   OFFLINE               
ora.dbs.gsd    application    0/5    0/0    OFFLINE   OFFLINE               
ora.dbs.ons    application    0/3    0/0    OFFLINE   OFFLINE               
ora.dbs.vip    application    0/0    0/0    OFFLINE   OFFLINE               
ora.wxxrdb.db  application    0/1    0/1    OFFLINE   OFFLINE               
ora....b1.inst application    0/5    0/0    OFFLINE   OFFLINE               
ora....b2.inst application    0/5    0/0    OFFLINE   OFFLINE               


安装数据库补丁,打开xmanager登陆dbp节点1,运行./runInstaller脚本;

130604RAC打补丁-成功从10.2.0.1升级到10.2.0.4_第12张图片

在此处选择数据库目录,升级数据库;

130604RAC打补丁-成功从10.2.0.1升级到10.2.0.4_第13张图片

提示目录非空,是否继续安装,继续;

130604RAC打补丁-成功从10.2.0.1升级到10.2.0.4_第14张图片


默认选择cluster安装双节点;130604RAC打补丁-成功从10.2.0.1升级到10.2.0.4_第15张图片

通过检查;

130604RAC打补丁-成功从10.2.0.1升级到10.2.0.4_第16张图片

130604RAC打补丁-成功从10.2.0.1升级到10.2.0.4_第17张图片

 

130604RAC打补丁-成功从10.2.0.1升级到10.2.0.4_第18张图片

130604RAC打补丁-成功从10.2.0.1升级到10.2.0.4_第19张图片

安装成功后,需要在节点1dbp和节点2dps上先后分别运行脚本/oracle/product/database/root.sh

[root@dbp ~]# /oracle/product/database/root.sh
Running Oracle10 root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /oracle/product/database

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: y
   Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: y
   Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: y
   Copying coraenv to /usr/local/bin ...

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.sh script.
Now product-specific root actions will be performed.
[root@dbp ~]# ssh root@dbs
root@dbs's password: 
Last login: Tue Jun  4 14:37:41 2013 from 192.168.2.111
[root@dbs ~]# /oracle/product/database/root.sh
Running Oracle10 root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /oracle/product/database

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: y
   Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: y
   Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: y
   Copying coraenv to /usr/local/bin ...

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.sh script.
Now product-specific root actions will be performed.


之后将数据库启动的nomount,修改cluster_database参数,重新编译升级后对象;

 

[root@dbs ~]# crs_stat -t -v
Name           Type           R/RA   F/FT   Target    State     Host        
----------------------------------------------------------------------
ora....SM1.asm application    0/5    0/0    OFFLINE   OFFLINE               
ora....BP.lsnr application    0/5    0/0    OFFLINE   OFFLINE               
ora.dbp.gsd    application    0/5    0/0    OFFLINE   OFFLINE               
ora.dbp.ons    application    0/3    0/0    OFFLINE   OFFLINE               
ora.dbp.vip    application    0/0    0/0    OFFLINE   OFFLINE               
ora....SM2.asm application    0/5    0/0    OFFLINE   OFFLINE               
ora....BS.lsnr application    0/5    0/0    OFFLINE   OFFLINE               
ora.dbs.gsd    application    0/5    0/0    OFFLINE   OFFLINE               
ora.dbs.ons    application    0/3    0/0    OFFLINE   OFFLINE               
ora.dbs.vip    application    0/0    0/0    OFFLINE   OFFLINE               
ora.wxxrdb.db  application    0/1    0/1    OFFLINE   OFFLINE               
ora....b1.inst application    0/5    0/0    OFFLINE   OFFLINE               
ora....b2.inst application    0/5    0/0    OFFLINE   OFFLINE               
[root@dbs ~]# srvctl start nodeapps -n dbp
[root@dbs ~]# srvctl start nodeapps -n dbs
[root@dbs ~]# crs_stat -t -v
Name           Type           R/RA   F/FT   Target    State     Host        
----------------------------------------------------------------------
ora....SM1.asm application    0/5    0/0    OFFLINE   OFFLINE               
ora....BP.lsnr application    0/5    0/0    ONLINE    ONLINE    dbp         
ora.dbp.gsd    application    0/5    0/0    ONLINE    ONLINE    dbp         
ora.dbp.ons    application    0/3    0/0    ONLINE    ONLINE    dbp         
ora.dbp.vip    application    0/0    0/0    ONLINE    ONLINE    dbp         
ora....SM2.asm application    0/5    0/0    OFFLINE   OFFLINE               
ora....BS.lsnr application    0/5    0/0    ONLINE    ONLINE    dbs         
ora.dbs.gsd    application    0/5    0/0    ONLINE    ONLINE    dbs         
ora.dbs.ons    application    0/3    0/0    ONLINE    ONLINE    dbs         
ora.dbs.vip    application    0/0    0/0    ONLINE    ONLINE    dbs         
ora.wxxrdb.db  application    0/1    0/1    OFFLINE   OFFLINE               
ora....b1.inst application    0/5    0/0    OFFLINE   OFFLINE               
ora....b2.inst application    0/5    0/0    OFFLINE   OFFLINE               
[root@dbs ~]# srvctl start asm -n dbp
[root@dbs ~]# srvctl start asm -n dbs
[root@dbs ~]# srvctl start database -d wxxrdb -o nomount
[root@dbs ~]# crs_stat -t -v                            
Name           Type           R/RA   F/FT   Target    State     Host        
----------------------------------------------------------------------
ora....SM1.asm application    0/5    0/0    ONLINE    ONLINE    dbp         
ora....BP.lsnr application    0/5    0/0    ONLINE    ONLINE    dbp         
ora.dbp.gsd    application    0/5    0/0    ONLINE    ONLINE    dbp         
ora.dbp.ons    application    0/3    0/0    ONLINE    ONLINE    dbp         
ora.dbp.vip    application    0/0    0/0    ONLINE    ONLINE    dbp         
ora....SM2.asm application    0/5    0/0    ONLINE    ONLINE    dbs         
ora....BS.lsnr application    0/5    0/0    ONLINE    ONLINE    dbs         
ora.dbs.gsd    application    0/5    0/0    ONLINE    ONLINE    dbs         
ora.dbs.ons    application    0/3    0/0    ONLINE    ONLINE    dbs         
ora.dbs.vip    application    0/0    0/0    ONLINE    ONLINE    dbs         
ora.wxxrdb.db  application    0/1    0/1    ONLINE    ONLINE    dbs         
ora....b1.inst application    0/5    0/0    ONLINE    ONLINE    dbp         
ora....b2.inst application    0/5    0/0    ONLINE    ONLINE    dbs         
[root@dbs ~]# su - oracle
[oracle@dbs ~]$ sqlplus /nolog

SQL*Plus: Release 10.2.0.4.0 - Production on Tue Jun 4 15:04:51 2013

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

SQL> conn / as sysdba
Connected.

SQL> alter system set cluster_database=false scope=spfile;

System altered.

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@dbs ~]$ srvctl stop database
PRKO-2001 : Invalid command line syntax
[oracle@dbs ~]$ srvctl stop database -d wxxrdb
[oracle@dbs ~]$ srvctl status database -d wxxrdb  
Instance wxxrdb1 is not running on node dbp
Instance wxxrdb2 is not running on node dbs
[oracle@dbs ~]$ sqlplus /nolog

SQL*Plus: Release 10.2.0.4.0 - Production on Tue Jun 4 15:06:14 2013

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

SQL> startup upgrade
ORA-01031: insufficient privileges
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup upgrade
ORACLE instance started.

Total System Global Area  771751936 bytes
Fixed Size                  2087088 bytes
Variable Size             201328464 bytes
Database Buffers          562036736 bytes
Redo Buffers                6299648 bytes
Database mounted.
Database opened.
SQL> spool /home/oracle/patch.log;
SQL> @?/rdbms/admin/catupgrd.sql;


略去编译中间提示。。。

SQL> spool off
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.

Total System Global Area  771751936 bytes
Fixed Size                  2087088 bytes
Variable Size             255854416 bytes
Database Buffers          507510784 bytes
Redo Buffers                6299648 bytes
Database mounted.
Database opened.


 

SQL> @?/rdbms/admin/utlrp.sql;

TIMESTAMP
TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN  2013-06-04 15:27:27
DOC>   The following PL/SQL block invokes UTL_RECOMP to recompile invalid
DOC>   objects in the database. Recompilation time is proportional to the
DOC>   number of invalid objects in the database, so this command may take
DOC>   a long time to execute on a database with a large number of invalid
DOC>   objects.
DOC>
DOC>   Use the following queries to track recompilation progress:
DOC>
DOC>   1. Query returning the number of invalid objects remaining. This
DOC>      number should decrease with time.
DOC>         SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);
DOC>
DOC>   2. Query returning the number of objects compiled so far. This number
DOC>      should increase with time.
DOC>         SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;
DOC>
DOC>   This script automatically chooses serial or parallel recompilation
DOC>   based on the number of CPUs available (parameter cpu_count) multiplied
DOC>   by the number of threads per CPU (parameter parallel_threads_per_cpu).
DOC>   On RAC, this number is added across all RAC nodes.
DOC>
DOC>   UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel
DOC>   recompilation. Jobs are created without instance affinity so that they
DOC>   can migrate across RAC nodes. Use the following queries to verify
DOC>   whether UTL_RECOMP jobs are being created and run correctly:
DOC>
DOC>   1. Query showing jobs created by UTL_RECOMP
DOC>         SELECT job_name FROM dba_scheduler_jobs
DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>
DOC>   2. Query showing UTL_RECOMP jobs that are running
DOC>         SELECT job_name FROM dba_scheduler_running_jobs
DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>#

TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_END  2013-06-04 15:28:03
DOC> The following query reports the number of objects that have compiled
DOC> with errors (objects that compile with errors have status set to 3 in
DOC> obj$). If the number is higher than expected, please examine the error
DOC> messages reported with each object (using SHOW ERRORS) to see if they
DOC> point to system misconfiguration or resource constraints that must be
DOC> fixed before attempting to recompile these objects.
DOC>#

OBJECTS WITH ERRORS
-------------------
                  1
DOC> The following query reports the number of errors caught during
DOC> recompilation. If this number is non-zero, please query the error
DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors
DOC> are due to misconfiguration or resource constraints that must be
DOC> fixed before objects can compile successfully.
DOC>#

ERRORS DURING RECOMPILATION
---------------------------
                          0
SQL> alter system set cluster_database=true scope=spfile;
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.


提示有一个对象有错,后面待查;

SQL> startup;
ORACLE instance started.

Total System Global Area  771751936 bytes
Fixed Size                  2087088 bytes
Variable Size             255854416 bytes
Database Buffers          507510784 bytes
Redo Buffers                6299648 bytes
Database mounted.
Database opened.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@dbs ~]$ srvctl start database -d wxxrdb     
[oracle@dbs ~]$ sqlplus /nolog

SQL*Plus: Release 10.2.0.4.0 - Production on Tue Jun 4 15:33:13 2013

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

SQL> conn / as sydsba
SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
where   ::= [/][@] | /
SQL> conn / as sysba
SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
where   ::= [/][@] | /
SQL> conn / as sysdba
Connected.
SQL> select * from dba_errors
  2  ;

OWNER                          NAME                           TYPE
------------------------------ ------------------------------ ------------
  SEQUENCE       LINE   POSITION
---------- ---------- ----------
TEXT
--------------------------------------------------------------------------------
ATTRIBUTE MESSAGE_NUMBER
--------- --------------
MDSYS                          SDO_3GL                        PACKAGE BODY
         1       1433         28
PLS-00302: component 'CONVERT_DISTANCE' must be declared
ERROR                302


OWNER                          NAME                           TYPE
------------------------------ ------------------------------ ------------
  SEQUENCE       LINE   POSITION
---------- ---------- ----------
TEXT
--------------------------------------------------------------------------------
ATTRIBUTE MESSAGE_NUMBER
--------- --------------
MDSYS                          SDO_3GL                        PACKAGE BODY
         2       1433          7
PL/SQL: Statement ignored
ERROR                  0


OWNER                          NAME                           TYPE
------------------------------ ------------------------------ ------------
  SEQUENCE       LINE   POSITION
---------- ---------- ----------
TEXT
--------------------------------------------------------------------------------
ATTRIBUTE MESSAGE_NUMBER
--------- --------------
MDSYS                          SDO_3GL                        PACKAGE BODY
         3       1447         26
PLS-00302: component 'CONVERT_DISTANCE' must be declared
ERROR                302


OWNER                          NAME                           TYPE
------------------------------ ------------------------------ ------------
  SEQUENCE       LINE   POSITION
---------- ---------- ----------
TEXT
--------------------------------------------------------------------------------
ATTRIBUTE MESSAGE_NUMBER
--------- --------------
MDSYS                          SDO_3GL                        PACKAGE BODY
         4       1447          9
PL/SQL: Statement ignored
ERROR                  0


OWNER                          NAME                           TYPE
------------------------------ ------------------------------ ------------
  SEQUENCE       LINE   POSITION
---------- ---------- ----------
TEXT
--------------------------------------------------------------------------------
ATTRIBUTE MESSAGE_NUMBER
--------- --------------
MDSYS                          SDO_3GL                        PACKAGE BODY
         5       1471         24
PLS-00302: component 'EXPAND_MULTI_POINT' must be declared
ERROR                302


OWNER                          NAME                           TYPE
------------------------------ ------------------------------ ------------
  SEQUENCE       LINE   POSITION
---------- ---------- ----------
TEXT
--------------------------------------------------------------------------------
ATTRIBUTE MESSAGE_NUMBER
--------- --------------
MDSYS                          SDO_3GL                        PACKAGE BODY
         6       1471          7
PL/SQL: Statement ignored
ERROR                  0


6 rows selected.

SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE    10.2.0.4.0      Production
TNS for Linux: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production

SQL> col status from a10
SP2-0158: unknown COLUMN option "from"
SQL> col status format a10
SQL> col version format a15
SQL> col comp_name format a30
SQL> select comp_name,version,status from dba_registry;

COMP_NAME                      VERSION         STATUS
------------------------------ --------------- ----------
Oracle Enterprise Manager      10.2.0.4.0      VALID
Oracle interMedia              10.2.0.4.0      VALID
Oracle XML Database            10.2.0.4.0      VALID
Oracle Expression Filter       10.2.0.4.0      VALID
Oracle Rule Manager            10.2.0.4.0      VALID
Oracle Workspace Manager       10.2.0.4.3      VALID
Oracle Database Catalog Views  10.2.0.4.0      VALID
Oracle Database Packages and T 10.2.0.4.0      VALID
ypes

JServer JAVA Virtual Machine   10.2.0.4.0      VALID

COMP_NAME                      VERSION         STATUS
------------------------------ --------------- ----------
Oracle XDK                     10.2.0.4.0      VALID
Oracle Database Java Packages  10.2.0.4.0      VALID
Oracle Real Application Cluste 10.2.0.4.0      VALID
rs


12 rows selected.

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@dbs ~]$ emctl start dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0  
Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
http://dbp:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control .... started. 
------------------------------------------------------------------
Logs are generated in directory /oracle/product/database/dbs_wxxrdb2/sysman/log 
[oracle@dbs ~]$ exit
logout
[root@dbs ~]# exit
logout
Connection to dbs closed.
[root@dbp ~]# su - oracle
[oracle@dbp ~]$ emctl start dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0  
Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
http://dbp:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control .................................... started. 
------------------------------------------------------------------
Logs are generated in directory /oracle/product/database/dbp_wxxrdb1/sysman/log 
[oracle@dbp ~]$ emctl stop dbconsole 
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0  
Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
http://dbp:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ... 
 ...  Stopped. 
[oracle@dbp ~]$ crs_stat -t -v
Name           Type           R/RA   F/FT   Target    State     Host        
----------------------------------------------------------------------
ora....SM1.asm application    0/5    0/0    ONLINE    ONLINE    dbp         
ora....BP.lsnr application    0/5    0/0    ONLINE    ONLINE    dbp         
ora.dbp.gsd    application    0/5    0/0    ONLINE    ONLINE    dbp         
ora.dbp.ons    application    0/3    0/0    ONLINE    ONLINE    dbp         
ora.dbp.vip    application    0/0    0/0    ONLINE    ONLINE    dbp         
ora....SM2.asm application    0/5    0/0    ONLINE    ONLINE    dbs         
ora....BS.lsnr application    0/5    0/0    ONLINE    ONLINE    dbs         
ora.dbs.gsd    application    0/5    0/0    ONLINE    ONLINE    dbs         
ora.dbs.ons    application    0/3    0/0    ONLINE    ONLINE    dbs         
ora.dbs.vip    application    0/0    0/0    ONLINE    ONLINE    dbs         
ora.wxxrdb.db  application    0/1    0/1    ONLINE    ONLINE    dbp         
ora....b1.inst application    0/5    0/0    ONLINE    ONLINE    dbp         
ora....b2.inst application    0/5    0/0    ONLINE    ONLINE    dbs         
[oracle@dbp ~]$ srvctl stop database -d wxxrdb
[oracle@dbp ~]$ srvctl stop nodeapps -n dbp
[oracle@dbp ~]$ srvctl stop nodeapps -n dbs
[oracle@dbp ~]$ crs_stat -t -v                
Name           Type           R/RA   F/FT   Target    State     Host        
----------------------------------------------------------------------
ora....SM1.asm application    0/5    0/0    ONLINE    ONLINE    dbp         
ora....BP.lsnr application    0/5    0/0    OFFLINE   OFFLINE               
ora.dbp.gsd    application    0/5    0/0    OFFLINE   OFFLINE               
ora.dbp.ons    application    0/3    0/0    OFFLINE   OFFLINE               
ora.dbp.vip    application    0/0    0/0    OFFLINE   OFFLINE               
ora....SM2.asm application    0/5    0/0    ONLINE    ONLINE    dbs         
ora....BS.lsnr application    0/5    0/0    OFFLINE   OFFLINE               
ora.dbs.gsd    application    0/5    0/0    OFFLINE   OFFLINE               
ora.dbs.ons    application    0/3    0/0    OFFLINE   OFFLINE               
ora.dbs.vip    application    0/0    0/0    OFFLINE   OFFLINE               
ora.wxxrdb.db  application    0/1    0/1    OFFLINE   OFFLINE               
ora....b1.inst application    0/5    0/0    OFFLINE   OFFLINE               
ora....b2.inst application    0/5    0/0    OFFLINE   OFFLINE               
[oracle@dbp ~]$ srvctl stop asm -n dbp
[oracle@dbp ~]$ srvctl stop asm -n dbs
[oracle@dbp ~]$ crs_stat -t -v        
Name           Type           R/RA   F/FT   Target    State     Host        
----------------------------------------------------------------------
ora....SM1.asm application    0/5    0/0    OFFLINE   OFFLINE               
ora....BP.lsnr application    0/5    0/0    OFFLINE   OFFLINE               
ora.dbp.gsd    application    0/5    0/0    OFFLINE   OFFLINE               
ora.dbp.ons    application    0/3    0/0    OFFLINE   OFFLINE               
ora.dbp.vip    application    0/0    0/0    OFFLINE   OFFLINE               
ora....SM2.asm application    0/5    0/0    OFFLINE   OFFLINE               
ora....BS.lsnr application    0/5    0/0    OFFLINE   OFFLINE               
ora.dbs.gsd    application    0/5    0/0    OFFLINE   OFFLINE               
ora.dbs.ons    application    0/3    0/0    OFFLINE   OFFLINE               
ora.dbs.vip    application    0/0    0/0    OFFLINE   OFFLINE               
ora.wxxrdb.db  application    0/1    0/1    OFFLINE   OFFLINE               
ora....b1.inst application    0/5    0/0    OFFLINE   OFFLINE               
ora....b2.inst application    0/5    0/0    OFFLINE   OFFLINE               
[oracle@dbp ~]$ exit
logout
[root@dbp ~]# shutdown -h now

Broadcast message from root (pts/1) (Tue Jun  4 15:42:07 2013):

The system is going down for system halt NOW!

经过查询,MDSYS.SDO_3GL 是地理信息库中的对象,在此忽略

还有一种升级的方法dbua,后面的文章介绍;

 

你可能感兴趣的:(RAC)