ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 升级oracle 10g clusterware 和 rac

升级oracle 10g clusterware 和 rac

原创 Linux操作系统 作者:byfree 时间:2009-07-07 12:31:19 0 删除 编辑
1. Stopping All Services for an Oracle Clusterware Installation
C:\>emctl stop dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
http://rac1:1158/em/console/aboutApplication
OracleDBConsoleorcl1 服务正在停止.................
OracleDBConsoleorcl1 服务已成功停止。
C:\>isqlplusctl stop
iSQL*Plus 10.2.0.1.0
Copyright (c) 2003, 2005, Oracle.  All rights reserved.
Stopping iSQL*Plus ...
iSQL*Plus stopped.
C:\oracle\product\10.2.0\db_1\BIN>srvctl stop instance -d orcl -i orcl1
C:\oracle\product\10.2.0\db_1\BIN>srvctl stop asm -n rac1
C:\oracle\product\10.2.0\db_1\BIN>srvctl stop nodeapps -n rac1
C:\>crsctl stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
检查oracle的其它相关服务,一一关闭
C:\>net start
C:\>net stop 服务名

2.升级clusterware
点击补丁包里的setup.exe,进行图形安装界面,在指定主目录详细信息时,选择crs_home的名称(这就是clusterware升级的地方,很简单,但很关键)
图形安装界面完成后,还需要运行C:\oracle\product\10.2.0\crs\install\patch102.bat,完成后继续在另一个节点再此操作。
C:\oracle\product\10.2.0\crs\install>patch102
Successful validation check of Oracle CRS services status
Successful binary patch of the C:\oracle\product\10.2.0\crs
Successful cleanup of patch subdirectory
C:\oracle\product\10.2.0\crs\inventory\Templates\install\patch102\bin\cluvfy.bat -> C:\oracle\product\10.2.0\crs\inventory\Templates\bin\cluvfy.bat
C:\oracle\product\10.2.0\crs\inventory\Templates\install\patch102\bin\gsd.bat -> C:\oracle\product\10.2.0\crs\inventory\Templates\bin\gsd.bat
C:\oracle\product\10.2.0\crs\inventory\Templates\install\patch102\bin\gsdctl.bat -> C:\oracle\product\10.2.0\crs\inventory\Templates\bin\gsdctl.bat
C:\oracle\product\10.2.0\crs\inventory\Templates\install\patch102\bin\gsdstop.bat -> C:\oracle\product\10.2.0\crs\inventory\Templates\bin\gsdstop.bat
C:\oracle\product\10.2.0\crs\inventory\Templates\install\patch102\bin\instOracle.key -> C:\oracle\product\10.2.0\crs\inventory\Templates\bin\instOracle.key
C:\oracle\product\10.2.0\crs\inventory\Templates\install\patch102\bin\localconfig.bat -> C:\oracle\product\10.2.0\crs\inventory\Templates\bin\localconfig.bat
C:\oracle\product\10.2.0\crs\inventory\Templates\install\patch102\bin\racgwrap.bat.sbs -> C:\oracle\product\10.2.0\crs\inventory\Templates\bin\racgwrap.bat.sbs
C:\oracle\product\10.2.0\crs\inventory\Templates\install\patch102\bin\srvctl.bat -> C:\oracle\product\10.2.0\crs\inventory\Templates\bin\srvctl.bat
C:\oracle\product\10.2.0\crs\inventory\Templates\install\patch102\bin\usrvip.bat -> C:\oracle\product\10.2.0\crs\inventory\Templates\bin\usrvip.bat
C:\oracle\product\10.2.0\crs\inventory\Templates\install\patch102\bin\vipca.bat-> C:\oracle\product\10.2.0\crs\inventory\Templates\bin\vipca.bat
C:\oracle\product\10.2.0\crs\inventory\Templates\install\patch102\cv\remenv\exectask.bat -> C:\oracle\product\10.2.0\crs\inventory\Templates\cv\remenv\exectask.bat
C:\oracle\product\10.2.0\crs\inventory\Templates\install\patch102\evm\admin\conf\evm.auth -> C:\oracle\product\10.2.0\crs\inventory\Templates\evm\admin\conf\evm.auth
C:\oracle\product\10.2.0\crs\inventory\Templates\install\patch102\evm\admin\conf\evmdaemon.conf -> C:\oracle\product\10.2.0\crs\inventory\Templates\evm\admin\conf\evmdaemon.conf
C:\oracle\product\10.2.0\crs\inventory\Templates\install\patch102\evm\admin\conf\evmlogger.conf -> C:\oracle\product\10.2.0\crs\inventory\Templates\evm\admin\conf\evmlogger.conf
C:\oracle\product\10.2.0\crs\inventory\Templates\install\patch102\install\preupdate.bat -> C:\oracle\product\10.2.0\crs\inventory\Templates\install\preupdate.bat
复制了 15 个文件
Successful startup of OracleCSService
Successful startup of OracleEvmService
Successful startup of OracleCRService
Setting up OPMD process
OpmdInstall:  OPM service successfully installed
OpmdFixupService:  Oracle Object Service set to manual startup and added to list
OpmdFixupService:  OracleCSService set to manual startup and added to list
OpmdFixupService:  OracleEVMService set to manual startup and added to list
OpmdFixupService:  OracleCRService set to manual startup and added to list
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: rac2 rac2-priv rac2
Creating OCR keys for user 'administrator', privgrp ''..
Operation successful.
clscfg -upgrade completed succssfully
Successful upgrade of this node to Oracle Cluster Ready Services 10204

3.Stopping All Services for an Oracle RAC Installation
C:\> ORACLE_BASE\ORACLE_HOME\bin\emctl stop dbconsole
C:\> ORACLE_BASE\ORACLE_HOME\bin\isqlplusctl stop
C:\> ORACLE_BASE\ORACLE_HOME\bin\srvctl stop service -d db_name [-s service_name_list [-i inst_name]]
C:\> ORACLE_BASE\ORACLE_HOME\bin\srvctl stop database -d db_name
C:\> ORACLE_BASE\ORACLE_HOME\bin\srvctl stop asm -n node
C:\> ORACLE_BASE\ORACLE_HOME\bin\srvctl stop listener -n node [-l listenername]

4.升级oracle db软件
停止oracle相关应用
点击补丁包里的setup.exe,进行oracle db软件升级
shutdown RAC两个节点的实例
SQL> shutdown immediate
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup nomount
ORACLE 例程已经启动。
Total System Global Area  209715200 bytes
Fixed Size                  1248140 bytes
Variable Size             134218868 bytes
Database Buffers           71303168 bytes
Redo Buffers                2945024 bytes
SQL> alter system set cluster_database=false scope=spfile;
系统已更改。
SQL> shutdown
ORA-01507: ??????

ORACLE 例程已经关闭。
SQL> startup upgrade
ORACLE 例程已经启动。
Total System Global Area  209715200 bytes
Fixed Size                  1248140 bytes
Variable Size             134218868 bytes
Database Buffers           71303168 bytes
Redo Buffers                2945024 bytes
数据库装载完毕。
数据库已经打开。

5.升级DB
C:\>sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on 星期二 7月 7 09:12:47 2009
Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
已连接到空闲例程。
SQL> startup upgrade
ORACLE 例程已经启动。
Total System Global Area  209715200 bytes
Fixed Size                  1295872 bytes
Variable Size             134220288 bytes
Database Buffers           71303168 bytes
Redo Buffers                2895872 bytes
数据库装载完毕。
数据库已经打开。
SQL> spool upgrade_info.log
SQL> @?\rdbms\admin\utlu102i.sql
Oracle Database 10.2 Upgrade Information Utility    07-07-2009 09:14:57
.
**********************************************************************
Database:
**********************************************************************
--> name:       ORCL
--> version:    10.2.0.1.0
--> compatible: 10.2.0.1.0
--> blocksize:  8192
.
**********************************************************************
Tablespaces: [make adjustments in the current environment]
**********************************************************************
--> SYSTEM tablespace is adequate for the upgrade.
.... minimum required size: 492 MB
.... AUTOEXTEND additional space required: 12 MB
--> UNDOTBS1 tablespace is adequate for the upgrade.
.... minimum required size: 401 MB
.... AUTOEXTEND additional space required: 356 MB
--> SYSAUX tablespace is adequate for the upgrade.
.... minimum required size: 300 MB
--> TEMP tablespace is adequate for the upgrade.
.... minimum required size: 58 MB
.... AUTOEXTEND additional space required: 37 MB
--> EXAMPLE tablespace is adequate for the upgrade.
.... minimum required size: 78 MB
.
**********************************************************************
Update Parameters: [Update Oracle Database 10.2 init.ora or spfile]
**********************************************************************
-- No update parameter changes are required.
.
**********************************************************************
Renamed Parameters: [Update Oracle Database 10.2 init.ora or spfile]
**********************************************************************
-- No renamed parameters found. No changes are required.
.
**********************************************************************
Obsolete/Deprecated Parameters: [Update Oracle Database 10.2 init.ora or spfile]
**********************************************************************
-- No obsolete parameters found. No changes are required
.
**********************************************************************
Components: [The following database components will be upgraded or installed]
**********************************************************************
--> Oracle Catalog Views         [upgrade]  VALID
--> Oracle Packages and Types    [upgrade]  VALID
--> JServer JAVA Virtual Machine [upgrade]  VALID
--> Oracle XDK for Java          [upgrade]  VALID
--> Oracle Java Packages         [upgrade]  VALID
--> Oracle Text                  [upgrade]  VALID
--> Oracle XML Database          [upgrade]  VALID
--> Real Application Clusters    [upgrade]  VALID
--> Oracle Workspace Manager     [upgrade]  VALID
--> Oracle Data Mining           [upgrade]  VALID
--> OLAP Analytic Workspace      [upgrade]  VALID
--> OLAP Catalog                 [upgrade]  VALID
--> Oracle OLAP API              [upgrade]  VALID
--> Oracle interMedia            [upgrade]  VALID
--> Spatial                      [upgrade]  VALID
--> Expression Filter            [upgrade]  VALID
--> EM Repository                [upgrade]  VALID
--> Rule Manager                 [upgrade]  VALID
.
**********************************************************************
Miscellaneous Warnings
**********************************************************************
WARNING: --> Database contains INVALID objects prior to upgrade.
.... USER DMSYS has 1 INVALID objects.
.... USER PUBLIC has 65 INVALID objects.
.... USER CTXSYS has 1 INVALID objects.
.... USER EXFSYS has 12 INVALID objects.
.... USER SYS has 138 INVALID objects.
.
PL/SQL 过程已成功完成。
SQL> spool off
SQL>
C:\> ORACLE_BASE\ORACLE_HOME\bin\srvctl start listener -n node
start the Automatic Storage Management instance.
For Oracle RAC installations:
Use SQL*Plus to log in to the database as the SYS user with SYSDBA privileges:
C:\> sqlplus / as sysdba
SQL> STARTUP NOMOUNT
SQL> ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=spfile;
SQL> SHUTDOWN

SQL> STARTUP UPGRADE
SQL> SPOOL patch.log
SQL> @ORACLE_BASE\ORACLE_HOME\rdbms\admin\catupgrd.sql
SQL> spool off
SQL> shutdown immediate
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup
ORACLE 例程已经启动。
Total System Global Area  209715200 bytes
Fixed Size                  1295872 bytes
Variable Size             184551936 bytes
Database Buffers           20971520 bytes
Redo Buffers                2895872 bytes
数据库装载完毕。
数据库已经打开。
SQL> @?\rdbms\admin\utlrp.sql
TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN  2009-07-07 10:22:05
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  2009-07-07 10:25:30
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
-------------------
                  0
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> SELECT COMP_NAME, VERSION, STATUS FROM SYS.DBA_REGISTRY;
COMP_NAME                           VERSION         STATUS
----------------------------------- --------------- ------
Oracle Enterprise Manager           10.2.0.4.0      VALID
Spatial                             10.2.0.4.0      VALID
Oracle interMedia                   10.2.0.4.0      VALID
OLAP Catalog                        10.2.0.4.0      VALID
Oracle XML Database                 10.2.0.4.0      VALID
Oracle Text                         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 Data Mining                  10.2.0.4.0      VALID
Oracle Database Catalog Views       10.2.0.4.0      VALID
Oracle Database Packages and Types  10.2.0.4.0      VALID
JServer JAVA Virtual Machine        10.2.0.4.0      VALID
Oracle XDK                          10.2.0.4.0      VALID
Oracle Database Java Packages       10.2.0.4.0      VALID
OLAP Analytic Workspace             10.2.0.4.0      VALID
Oracle OLAP API                     10.2.0.4.0      VALID
Oracle Real Application Clusters    10.2.0.4.0      VALID
For Oracle RAC installations:
SQL> ALTER SYSTEM SET CLUSTER_DATABASE=TRUE SCOPE=spfile;
Restart the database:
SQL> SHUTDOWN IMMEDIATE
SQL> STARTUP
Ensure the database and Listener are operational.
In the case of Oracle Real Application Clusters (RAC), execute
emca -upgrade db -cluster
操作这一步时,我遇到如下报错:
2009-7-7 10:49:41 oracle.sysman.emcp.EMConfig perform
严重: 无法备份文件 C:\oracle\product\10.2.0\db_1\rac2_orcl2
有关详细资料, 请参阅 C:\oracle\product\10.2.0\db_1\cfgtoollogs\emca\orcl\emca_2009-07-07_10-47-13-上午.log 中的日志文件。
2009-7-7 10:49:41 oracle.sysman.emcp.EMConfig perform
配置: Stack Trace:
oracle.sysman.emcp.exception.EMConfigException: 无法备份文件 C:\oracle\product\10.2.0\db_1\rac2_orcl2
 at oracle.sysman.emcp.EMAgentConfig.performUpgrade(EMAgentConfig.java:733)
 at oracle.sysman.emcp.EMAgentConfig.invoke(EMAgentConfig.java:238)
 at oracle.sysman.emcp.EMAgentConfig.invoke(EMAgentConfig.java:208)
 at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:175)
 at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:486)
 at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1142)
 at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:470)
 at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:419)
解决这个问题见:http://space.itpub.net/17997/viewspace-608496

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

下一篇: 重新配置rac的em
请登录后发表评论 登录
全部评论

注册时间:2008-04-16

  • 博文量
    65
  • 访问量
    232612