rac 10g 10.2.0.1升级到10.2.0.5具体解释[通俗易懂]

rac 10g 10.2.0.1升级到10.2.0.5具体解释

大家好,又见面了,我是全栈君。

    RAC 10.2.0.1 升级到 10.2.0.5

 

一、 准备:

Patch 包:p8202632_10205_LINUX.zip

 

节点数:3个节点

      RAC1    RAC2   RAC3

当前节点状态

节点1:

[root@rac1 bin]# ./crs_stat -t

Name          Type           Target    State    Host       

————————————————————

ora….B1.inst application    ONLINE   ONLINE    rac1       

ora….B2.inst application    ONLINE   ONLINE    rac2       

ora….B3.inst application    ONLINE   ONLINE    rac3       

ora.RACDB.db  application    ONLINE    ONLINE   rac1       

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   

 

查看当前数据库版本号

SYS@RACDB1>select * from v$version;

 

BANNER

—————————————————————-

Oracle Database 10g Enterprise Edition Release10.2.0.1.0 – Prod

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

 

二、 集群软件升级

2.1 上传升级须要的 patch

[root@rac1 soft]# chown oracle:oinstall -R Disk1/

[root@rac1 soft]# ll

drwxr-xr-x 5 oracle oinstall       4096 Jul 23  2010 Disk1

 

2.2 切换到oracle用户下进行

[root@rac1 Disk1]# su – oracle

[oracle@rac1 ~]$ cd /soft/Disk1/

[oracle@rac1 Disk1]$ ls

install patch_note.htm  response  runInstaller stage

[oracle@rac1 Disk1]$ ll

total 184

drwxr-xr-x  4oracle oinstall   4096 Apr 20  2010 install

-rwxrwxr-x  1oracle oinstall 165290 Jul 23  2010patch_note.htm

drwxr-xr-x  2oracle oinstall   4096 Apr 20  2010 response

-rwxr-xr-x  1oracle oinstall   3927 Apr 20  2010 runInstaller

drwxr-xr-x 11 oracle oinstall   4096 Jul 19 2010 stage

 

2.3 用srvctl 工具关闭进程和资源

注:依次在每一个节点上运行!!

[oracle@rac1 Disk1]$ srvctl stop nodeapps -n rac1

[oracle@rac2 ]$ srvctl stop nodeapps -n rac2

[oracle@rac3 ]$ srvctl stop nodeapps -n rac3

 

[oracle@rac1 Disk1]$ crs_stat -t

Name          Type           Target    State    Host       

————————————————————

ora….B1.inst application    OFFLINE  OFFLINE              

ora….B2.inst application    OFFLINE  OFFLINE              

ora….B3.inst application    OFFLINE  OFFLINE              

ora.RACDB.db  application    OFFLINE   OFFLINE              

ora….SM1.asm application    OFFLINE  OFFLINE              

ora….C1.lsnr application    OFFLINE  OFFLINE              

ora.rac1.gsd  application    OFFLINE   OFFLINE              

ora.rac1.ons  application    OFFLINE   OFFLINE              

ora.rac1.vip  application    OFFLINE   OFFLINE              

ora….SM2.asm application    OFFLINE  OFFLINE              

ora….C2.lsnr application    OFFLINE  OFFLINE              

ora.rac2.gsd  application    OFFLINE   OFFLINE              

ora.rac2.ons  application    OFFLINE   OFFLINE              

ora.rac2.vip  application    OFFLINE   OFFLINE              

ora….SM3.asm application    OFFLINE  OFFLINE              

ora….C3.lsnr application    OFFLINE  OFFLINE              

ora.rac3.gsd  application    OFFLINE   OFFLINE              

ora.rac3.ons  application    OFFLINE   OFFLINE              

ora.rac3.vip  application    OFFLINE   OFFLINE              

 

2.4 開始安装 patch

[root@rac1 Disk1]# xhost +

access control disabled, clients can connect fromany host

[root@rac1 Disk1]# su – oracle

[oracle@rac1 ~]$ cd /soft/Disk1/

[oracle@rac1 Disk1]$ ./runInstaller

 rac 10g 10.2.0.1升级到10.2.0.5具体解释[通俗易懂]

   选择安装CRS补丁位置,必须和曾经位置一样。!!

 

rac 10g 10.2.0.1升级到10.2.0.5具体解释[通俗易懂]

 

rac 10g 10.2.0.1升级到10.2.0.5具体解释[通俗易懂]

         有warning  说 swap空间不足  选中 下一步

 rac 10g 10.2.0.1升级到10.2.0.5具体解释[通俗易懂]

         整体配置预览   開始安装

 rac 10g 10.2.0.1升级到10.2.0.5具体解释[通俗易懂]

 

 rac 10g 10.2.0.1升级到10.2.0.5具体解释[通俗易懂]


rac 10g 10.2.0.1升级到10.2.0.5具体解释[通俗易懂]


rac 10g 10.2.0.1升级到10.2.0.5具体解释[通俗易懂]

此处特别注意!!

。看一下是否须要运行脚本

      刚好没截上图   一定依照顺序运行!

。!

节点1 :

[root@rac1 crsd]#/u01/app/oracle/product/10.2.0/db_1/bin/crsctl stop crs

Stopping resources.

Successfully stopped CRS resources

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.

[root@rac1 crsd]#/u01/app/oracle/product/10.2.0/db_1/install/root102.sh

Creating pre-patch directory for saving pre-patchclusterware files

Completed patching clusterware files to/u01/app/oracle/product/10.2.0/db_1

Relinking some shared libraries.

Relinking of patched files is complete.

WARNING: directory ‘/u01/app/oracle/product/10.2.0’is not owned by root

WARNING: directory ‘/u01/app/oracle/product’ is notowned by root

WARNING: directory ‘/u01/app/oracle’ is not ownedby root

WARNING: directory ‘/u01/app’ is not owned by root

WARNING: directory ‘/u01’ 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 maytake a while on some systems.

.

10205 patch successfully applied.

clscfg: EXISTING configuration version 3 detected.

clscfg: version 3 is 10G Release 2.

Successfully deleted 1 values from OCR.

Successfully deleted 1 keys from OCR.

Successfully accumulated necessary OCR keys.

Using ports: CSS=49895 CRS=49896 EVMC=49898 andEVMR=49897.

node <nodenumber>: <nodename><private interconnect name> <hostname>

node 1: rac1 rac1-priv rac1

Creating OCR keys for user ‘root’, privgrp ‘root’..

Operation successful.

clscfg -upgrade completed successfully

Creating’/u01/app/oracle/product/10.2.0/db_1/install/paramfile.crs’ with data used forCRS configuration

Setting CRS configuration values in/u01/app/oracle/product/10.2.0/db_1/install/paramfile.crs

节点2 :

[root@rac1 crsd]#/u01/app/oracle/product/10.2.0/db_1/bin/crsctl stop crs

[root@rac1 crsd]#/u01/app/oracle/product/10.2.0/db_1/install/root102.sh

节点3:

[root@rac1 crsd]#/u01/app/oracle/product/10.2.0/db_1/bin/crsctl stop crs

[root@rac1 crsd]#/u01/app/oracle/product/10.2.0/db_1/install/root102.sh

 

2.5 查看状态

[oracle@rac1 Disk1]$ crs_stat -t

Name          Type           Target    State    Host       

————————————————————

ora….B1.inst application    ONLINE   ONLINE    rac1       

ora….B2.inst application    ONLINE   ONLINE    rac2       

ora….B3.inst application    ONLINE   ONLINE    rac3       

ora.RACDB.db  application    ONLINE    ONLINE   rac1       

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     

 

 

三、 数据库软件升级

最好在建库之前进行数据库的升级,我这里是建库之后进行的

3.1 停止 em  和 isqlplus

[oracle@rac1 Disk1]$ export ORACLE_SID=RACDB1

[oracle@rac1 Disk1]$ emctl stop dbconsole

TZ set to PRC

Oracle Enterprise Manager 10g Database ControlRelease 10.2.0.1.0 

Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.

http://rac1:1158/em/console/aboutApplication

Stopping Oracle Enterprise Manager 10g DatabaseControl …

 …  Stopped.

[oracle@rac1 Disk1]$ isqlplusctl stop

iSQL*Plus 10.2.0.1.0

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

iSQL*Plus instance on port 5560 is not running …

 

    3.2 关闭服务和实例

   各个节点都运行!

!!

[oracle@rac1 ~]$ srvctl stop nodeapps -n rac1

[oracle@rac2 ~]$ srvctl stop nodeapps -n rac2

[oracle@rac3~ ]$ srvctl stop nodeapps -n rac3

 

[oracle@rac1 Disk1]$ crs_stat -t

Name          Type           Target    State    Host       

————————————————————

ora….B1.inst application    OFFLINE  OFFLINE              

ora….B2.inst application    OFFLINE  OFFLINE              

ora….B3.inst application    OFFLINE  OFFLINE              

ora.RACDB.db  application    OFFLINE   OFFLINE              

ora….SM1.asm application    OFFLINE  OFFLINE              

ora….C1.lsnr application    OFFLINE  OFFLINE              

ora.rac1.gsd  application    OFFLINE   OFFLINE              

ora.rac1.ons  application    OFFLINE   OFFLINE              

ora.rac1.vip  application    OFFLINE   OFFLINE              

ora….SM2.asm application    OFFLINE  OFFLINE              

ora….C2.lsnr application    OFFLINE  OFFLINE              

ora.rac2.gsd  application    OFFLINE   OFFLINE              

ora.rac2.ons  application    OFFLINE   OFFLINE              

ora.rac2.vip  application    OFFLINE   OFFLINE              

ora….SM3.asm application    OFFLINE  OFFLINE              

ora….C3.lsnr application    OFFLINE  OFFLINE              

ora.rac3.gsd  application    OFFLINE   OFFLINE              

ora.rac3.ons  application    OFFLINE   OFFLINE              

ora.rac3.vip  application    OFFLINE   OFFLINE             

 

    注:假设虚拟机老重新启动的话  直接两个节点 crs 都关了

    ./crsctl stop crs

 

    选择数据库安装的文件夹:

 rac 10g 10.2.0.1升级到10.2.0.5具体解释[通俗易懂]

    Not execute 和 warning的都勾选了  下一步

 rac 10g 10.2.0.1升级到10.2.0.5具体解释[通俗易懂]

 rac 10g 10.2.0.1升级到10.2.0.5具体解释[通俗易懂]

開始安装

 rac 10g 10.2.0.1升级到10.2.0.5具体解释[通俗易懂]

    按顺序运行脚本

 rac 10g 10.2.0.1升级到10.2.0.5具体解释[通俗易懂]

   运行完以下的脚本再点击OK

    最好别用ssh 怕某些权限情况!

节点1 :

[root@rac1 bin]# /u01/app/oracle/product/10.2.0/db_2/root.sh

Running Oracle 10g root.sh script…

 

The following environment variables are set as:

   ORACLE_OWNER= oracle

   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.

 

    节点2:

[root@rac2 cssd]#/u01/app/oracle/product/10.2.0/db_2/root.sh

Running Oracle 10g root.sh script…

 

The following environment variables are set as:

   ORACLE_OWNER= oracle

   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.

 

    节点3

[root@rac3 cssd]#/u01/app/oracle/product/10.2.0/db_2/root.sh

Running Oracle 10g root.sh script…

 

The following environment variables are set as:

   ORACLE_OWNER= oracle

   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

 

    检查日志中有没有错误,假设没有则启动数据库:  –文件数量非常多

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup

ORACLE instance started.

 

Total System Global Area  419430400 bytes

Fixed Size                  1274068 bytes

Variable Size             331353900 bytes

Database Buffers           83886080 bytes

Redo Buffers                2916352 bytes

Database mounted.

Database opened.

   

4.4 编译无效对象

SQL> @?

/rdbms/admin/utlrp.sql

    4.5 改參数

SQL> show parameter cluster

 

NAME                                 TYPE        VALUE

———————————— —————————————–

cluster_database                     boolean     FALSE

cluster_database_instances           integer     1

cluster_interconnects                string

SQL> alter system set cluster_database=truescope=spfile;

 

System altered.

 

    4.6 重新启动数据库,升级完毕

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup

ORACLE instance started.

 

Total System Global Area  419430400 bytes

Fixed Size                  1274068 bytes

Variable Size             331353900 bytes

Database Buffers           83886080 bytes

Redo Buffers                2916352 bytes

Database mounted.

Database opened.

SQL> select * from v$version;

 

BANNER

—————————————————————-

Oracle Database 10g Enterprise Edition Release10.2.0.5.0 – Prod

PL/SQL Release 10.2.0.5.0 – Production

CORE    10.2.0.5.0     Production

TNS for Linux: Version 10.2.0.5.0 – Production

NLSRTL Version 10.2.0.5.0 – Production

 

 

 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/115302.html原文链接:https://javaforall.cn

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)


相关推荐

  • 1.2线性代数-行列式的性质

    行列式的性质:性质1:;行列式转置值不变对行成立的性质,对列也成立性质二:两行互换(两列互换),行列式的值要变号证明思路:若D中的每一项都和D1中的每一项差一个负号,那么D=-D13214是1234经过一次顺序变换得来的(1和3变换位置),1234为偶,3214肯定是奇原因:2,7,12,13列标的排法没变,只是行标变了。原来是1-2-3-4行,现在变成了3-2-1-4推论:两行或者两列对应相等,行列式值等于0若第一行和第三行互换,那么根据…

  • pycharm的虚拟环境

    pycharm的虚拟环境选中file==》closeproject退出项目进入下方的情况现在我们在桌面新创建一个文件test.py可以看到可以执行test.py右键选中test.py,选择pycharm的方式打开test.py,会发现无法调试,出现NoPythonInterpreter的错误,为什么命令行可以执行test.py,pycharm执行test.py文件就不可以了呢?这是为什么呢?我们新建一个项目来查看原因第一个location为你项目的路径,可以点击右边的文件夹进行选择。第二个locatio.

  • 点击导航栏,切换div内容(js+css+html)[通俗易懂]

    点击导航栏,切换div内容(js+css+html)[通俗易懂]**成果展示**代码展示:* &lt;html&gt; &lt;head&gt; &lt;metacharset="utf-8"&gt; &lt;metahttp-equiv="X-UA-Compatible"content="IE=edge"&gt; &lt;title&gt;&lt;/tit

  • Python和Pycharm安装与卸载教程「建议收藏」

    Python和Pycharm安装与卸载教程「建议收藏」简介Python解释器通常我们说的Python是指一种跨平台的程序设计语言,而我们这里说的安装Python是指安装Python解释器,只有安装Python解释器你的计算机才能读懂Python语言。PycharmPycharm是一种PythonIDE(集成开发环境),带有一整套帮助Python开发的高效率工具。Pycharm分为专业版(Professional,收费)和社区版(community,免费)。只需要python基础功能可以下载社区版,想要解锁更多功能下载专业版。ps:学生可以申请免

  • WebService接口数据传输加密「建议收藏」

    WebService接口数据传输加密「建议收藏」WebService接口数据传输加密

  • git clone 显著提速,解决Github代码拉取速度缓慢问题[通俗易懂]

    git clone 显著提速,解决Github代码拉取速度缓慢问题[通俗易懂]对于国内用户来说,搬砖遇到clone Github速度十分缓慢的问题实在是一个令人头疼崩溃的问题。下面就介绍一个简单的方法很好的解决这个问题。方法:   1、注册码云账号   传送门   2、注册完成后点击页面右上角的“+” 号,选择新建项目创建新项目     3、在新页面中选择“导入已有项目”导入已有项目    4、复制需要导…

发表回复

您的电子邮箱地址不会被公开。

关注全栈程序员社区公众号