ORACLE_HOME= /u01/app/oracle/product/10.2.0/db_2
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]:
The file "oraenv" already exists in/usr/local/bin. Overwrite it (y/n)
[n]:
The file "coraenv" already exists in/usr/local/bin. Overwrite it (y/n)
[n]:
Entries will be added to the /etc/oratab file asneeded by
Database Configuration Assistant when a database iscreated
Finished running generic part of root.sh script.
Now product-specific root actions will beperformed.
四、 数据库升级
4.1 当前crs的状态 --看着就感觉很和谐!!
[root@rac1 bin]# ./crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....B1.inst application ONLINE OFFLINE
ora....B2.inst application ONLINE OFFLINE
ora....B3.inst application ONLINE OFFLINE
ora.RACDB.db application ONLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....SM2.asm application ONLINE ONLINE rac2
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2
ora....SM3.asm application ONLINE ONLINE rac3
ora....C3.lsnr application ONLINE ONLINE rac3
ora.rac3.gsd application ONLINE ONLINE rac3
ora.rac3.ons application ONLINE ONLINE rac3
ora.rac3.vip application ONLINE ONLINE rac3
升级数据库比较简单,dbua的方式更简单,这里介绍手动升级方式
4.2 在其中任意一个节点执行:
本次在rac1上执行
[oracle@rac1 ~]$ export ORACLE_SID=RACDB1
[oracle@rac1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on ThuAug 28 13:37:32 2014
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1273276 bytes
Variable Size 109052484 bytes
Database Buffers 171966464 bytes
Redo Buffers 2920448 bytes
SQL> alter system set sga_max_size=400Mscope=spfile;
System altered.
SQL> alter system set sga_target=400Mscope=spfile;
System altered.
SQL> show parameter shared
NAME TYPE VALUE
------------------------------------ -----------------------------------------
hi_shared_memory_address integer 0
max_shared_servers integer
shared_memory_address integer 0
shared_pool_reserved_size big integer 5033164
shared_pool_size big integer 0
shared_server_sessions integer
shared_servers integer 1
SQL> alter system set shared_pool_size='150M'scope=spfile;
System altered.
SQL> alter system set java_pool_size='150M'scope=spfile;
System altered.
SQL> show parameter cluster
NAME TYPE VALUE
------------------------------------ -----------------------------------------
cluster_database boolean TRUE
cluster_database_instances integer 2
cluster_interconnects string
SQL> alter system set cluster_database=falsescope=spfile;
System altered.
注:保证shared_pool_size 和 java_pool_size 不小于150m。因为数据文件是共享的,所以升级的时候只需要在一个节点升级就行,所以要把CLUSTER_DATABASE设置成FALSE
4.3 执行更新脚本
SQL> shutdown immediate
SQL> startup upgrade
SQL> spool /tmp/patch.log
SQL> @ /rdbms/admin/catupgrd.sql
SQL> spool off
检查日志中有没有错误,如果没有则启动数据库: --文件数