Chinaunix首页 | 论坛 | 博客
  • 博客访问: 688073
  • 博文数量: 191
  • 博客积分: 10987
  • 博客等级: 上将
  • 技术积分: 1925
  • 用 户 组: 普通用户
  • 注册时间: 2009-04-22 09:52
文章分类

全部博文(191)

文章存档

2014年(10)

2011年(11)

2010年(38)

2009年(132)

分类: Oracle

2011-07-13 12:24:06

10.2.0.1升级10.2.0.5 单实例:(10g Release 2 (10.2.0.5) Patch Set 4 for Linux x86)
 
1. Update Oracle Time Zone Definitions(夏令时DSTv4):
 1.1 主要是针对数据库内有 TIMESTAMP WITH LOCAL TIME ZONE (TSLTZ) and TIMESTAMP WITH TIME ZONE (TSTZ) data types 两类数据类型
 1.2 查看MOS(metalink)document 1086400.1,具体如何实施upate DSTv4 ,对于升级到10.2.0.5
    这里做简单介绍:
   1.2.1 When patching from a lower 10.2 release or upgrading from 10.1.0.x directly to 10.2.0.5,
         check the current version of the Oracle time zone definitions with the following command:
         SELECT version FROM v$timezone_file;
         查询结果:
              若:If this query reports version 4, no action is required.
              若:If this reports a version lower or higher than 4,
                  see My Oracle Support document 1086400.1 Actions for the DSTv4 update in the Release 10.2.0.5 patchset.
   1.2.2 On upgrading from any release of Oracle9i to Release 10.2.0.5,
         see My Oracle Support document 1086400.1 Actions for the DSTv4 update in the 10.2.0.5 patchset.
   1.2.3 On upgrading from Release 8.1.7 directly to Release 10.2.0.5,
         no action is required because Release 8.1.7 has no timezone data stored.
2.关闭数据库(单实例)
shutdown immediate
3.停止EM资源管理器(单实例)
emctl stop dbconsole
4.停止监听(单实例)
lsnrctl  stop
5.oracle软件升级分交互式和非交互式(Interactively and NOninteractively)(软件升级)
我这里选择交互式升级方式 (interactively)
% cd patchset_directory/Disk1                                                                                                                                                                                                                                                                                                                                                                                                                                                           
% ./runInstaller
next
next
。。。。
软件升级完成之后,最后使用root用户执行 $ORACLE_HOME/root.sh
6. Upgrading Oracle Database 10g Release 10.2.0.x to Oracle Database 10g Release 10.2.0.5(数据库升级)
  6.1  Upgrading a Release 10.2 Database using Oracle Database Upgrade Assistant
  6.2  Manually Upgrading a Release 10.2 Database 
  选择手工升级(6.2)
       6.2.1 Start the database in the UPGRADE mode:                         
             SQL> STARTUP UPGRADE                                                    
      6.2.2 Set the system to spool results to a log file for later analysis:
             SQL> SPOOL upgrade_info.log                                       
      6.2.3 Run the Pre-Upgrade Information Tool:                           
             SQL> @/rdbms/admin/utlu102i.sql                                   
      6.2.4 Turn off the spooling of script results to the log file:        
             SQL> SPOOL OFF
7. After you install the patch set, you must perform the following steps on every database associated with the upgraded Oracle home: 
    7.1 开启监听:
       $ lsnrctl start
    7.2 执行以下脚本:
     SQL> STARTUP UPGRADE                                                            
     SQL> SPOOL patch.log                                                                                                                                       
     SQL> @?/rdbms/admin/catupgrd.sql
     SQL> SPOOL OFF
    7.3 Restart the database:               
         SQL> SHUTDOWN IMMEDIATE
         SQL> STARTUP
8.Run the utlrp.sql script to recompile all invalid PL/SQL packages now instead of when the packages are accessed for the first time.
       SQL> @?/rdbms/admin/utlrp.sql 
  这里注意:
     When the 10.2.0.5 patch set is applied to an Oracle10g Standard Edition database, there may be 54 invalid objects after the utlrp.sql script runs.
     These objects belong to the unsupported components and do not affect the database operation.
     Ignore any messages indicating that the database contains invalid recycle bin objects similar to the following:                                                                                                                                
                                                                                                                                                                                                                                               
      BIN$4lzljWIt9gfgMFeM2hVSoA==$0                                                                                                                                                                                                                 
     This issue is tracked with Oracle bug 9386364.
9.  Run the following command to check the status of all the components after the upgrade:                                                                                                                                                                                              
        SQL> SELECT COMP_NAME, VERSION, STATUS FROM SYS.DBA_REGISTRY;
10. 查看数据库对象的是否还有无效对象:
    select * from dba_objects where status='INVALID'
==========================================完=================================================
阅读(1717) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~