ITPub博客

首页 > Linux操作系统 > Linux操作系统 > oracle 数据库升级

oracle 数据库升级

原创 Linux操作系统 作者:Kevene 时间:2010-07-05 13:06:09 0 删除 编辑
发现好久没有弄博客了,呵呵 。今天写了升级文档先贴上
 

1升级原因

在产品数据库上进程花费大量时间在内存中查找剩余空间,没找到,进行了扩展,有可能是内存碎片比较严重。确定为oracle BUG:4286095。

Memory Notification: Library Cache Object loaded into SGA

Heap size 2931K exceeds notification threshold (2048K)

2升级的目的

修复在现有的产品数据库上出现oracle BUG:4286095和一些oracle 官方已经公布的潜藏BUG。

3升级过程

1 备份数据库软件

   tar –cvf /data/oracle_sf_bak.tar /data/oracle/product

 

2 备份数据库

   run {

allocate channel ch1 device type disk;

allocate channel ch2 device type disk;

allocate channel ch3 device type disk;

allocate channel ch4 device type disk;

backup full

filesperset=2

tag='Full_%d'

format='/data/backup/%T_full_%d_%s_%p'

database include current controlfile;

release channel ch1;

release channel ch2;

release channel ch3;

release channel ch4;

}

 

3 升级oracle软件

升级到10.2.0.4 对应的oracle补丁为p6810189_10204_Linux-x86-64(1).zip

解压p6810189的补丁包

unzip p6810189_10204_Linux-x86-64(1).zip

停数据库

sqlplus /nolog

conn /as sysdba

shutdown immediate

exit

停止数据库监听LISTENER

Lsnrctl stop

停止Oracle Enterprise Manager

emctl stop dbconsole

升级oracle软件

cd Disk1

./runInstaller

 

4升级数据库

1重新用upgrade启动数据库,运行catupgrd.sql升级脚本

sqlplus /nolog

conn /as sysdba

startup upgrade

spool patch.log

@?/rdbms/admin/catupgrd.sql

spool off

shutdown immediate

startup

启LISTENER

lsnrctl start

启Oracle Enterprise Manager

emctl start dbconsole

 

2重新编译无效对象

select count(*) from dba_objects where status='INVALID';

如果上面sql结果不为0,那么运行下面的脚本,重新编译无效对象

@?/rdbms/admin/utlrp.sql

select count(*) from dba_objects where status='INVALID';

4回退方式

    使用升级前的备份进行回退

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

上一篇: OWSG
请登录后发表评论 登录
全部评论

注册时间:2008-11-16

  • 博文量
    52
  • 访问量
    215363