Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7306393
  • 博文数量: 444
  • 博客积分: 10593
  • 博客等级: 上将
  • 技术积分: 3852
  • 用 户 组: 普通用户
  • 注册时间: 2006-05-09 15:26
文章分类

全部博文(444)

文章存档

2014年(1)

2013年(10)

2012年(18)

2011年(35)

2010年(125)

2009年(108)

2008年(52)

2007年(72)

2006年(23)

分类: Oracle

2010-10-07 08:51:35

今天做了10.1.0.3升级到10.1.0.5的升级测试,感觉挺简单的!期间参考了readme文档.推荐大家多使用Oracle提供的官方文档,嘿嘿,以下是具体步骤:
一 准备并安装升级包软件
1 升级准备
 1>从上下载相应升级软件包
 2>设置环境变量:$ORACLE_HOME=oracle_home
                 $ORACLE_SID=sid
                 $export ORACLE_HOME ORACLE_SID
2 关闭数据库(normal/immediate)
 1>如果是RAC,则在所有的节点上关闭实例 $ORACLE_HOME/bin/srvctl stop database -d db_name
 2>如果是ASM,先关闭所有ASM支持的数据库再关闭ASM实例 $ORACLE_HOME/bin/srvctl stop asm -n node $ORACLE_HOME/bin/srvctl stop nodeapps -n node
3 关闭所有的进程、监听以及CSS(Oracle Cluster Synchronization Service) deamon守护进程as root 用户
 #/etc/init.d/init.cssd stop
4 备份数据库系统
5 更新安装(交互式和非交互式:interactively or noninteractively)
  1>交互模式(interactively)
    1)用oracle账号登陆
    2)$ DISPLAY=local_host:0.0 ; export DISPLAY
    3)进入patch产品目录:$./runInstaller
    4)如果已经将环境变量设置好,则Oracle更新包自动会找到更新来路
     directory_path/stage/products.xml
      RAC适用语法:$ ./runInstaller -updateNodeList "CLUSTER_NODES=node2, node1, node3" -local ORACLE_HOME=oracle_home_path
  2>非交互模式(Noninteractively)
    1)用oracle账号登陆
    2)编辑好response_file
    3)$./runInstaller -silent -responseFile response_file
二 升级数据库
upgrading Release10.1 to 10.1.0.5
Preupgrade:
1 check system tablespace size
  ensure that there is at least 10MB of free space allocated to system tablespace
2 check xdb tablespace size
  for rac,ensure that there is at lease 50MB of free space allocated to xdb tablespace
3 set shared_pool_size and jave_pool_size initialization parameters
  1>start the database
    SQL>startup
  2>ensure db uses pfile
    SQL>show parameter pfile;
  3>determine the current values of these parameters
    SQL>show parameter shared_pool_size
    SQL>show parameter java_pool_size
    SQL>ALTER SYSTEM SET SHARED_POOL_SIZE='150M' SCOPE=spfile;  --if necessary,at least 150MB
    SQL>ALTER SYSTEM SET JAVA_POOL_SIZE='150M' SCOPE=spfile;  --if necessary,at least 150MB
    SQL>shutdown immediate
upgrade:
1 login as oracle software owner user
2 For RAC installations, start node applications on each node of the cluster as follows:
  $ srvctl start nodeapps -n nodename
3 If you are using ASM, start the ASM instance.
  For single-instance installations, start the listener as follows:
  $lsnrctl start
4 execute script
  SQL> STARTUP UPGRADE
  SQL> SPOOL patch.log
  SQL> @?/rdbms/admin/catpatch.sql   --You may wait for a long time!
  SQL> SPOOL OFF
If necessary, rerun the catpatch.sql script after correcting any problems.
5 recompile db object
  SQL>select count(*) from dba_objects where status='INVALID';
  SQL>shutdown immediate
  SQL>startup
  SQL>@?/rdbms/admin/utlrp.sql
  SQL>select count(*) from dba_objects where status='INVALID';
 
6 if you are using RMAN catalog,enter the following command
  $rman catalog
  RMAN>upgrade catalog;
  OF curse,U can upgrade other object,like OCCI and so on.
 
阅读(967) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~