oracle 数据库升级

发现好久没有弄博客了,呵呵 。今天写了升级文档先贴上
 

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博客 ” ,链接:http://blog.itpub.net/16719800/viewspace-667214/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/16719800/viewspace-667214/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值