Oracle 10.2.0.1 升级到 10.2.0.4

--*********************************

-- Oracle 10.2.0.1 10.2.0.4

--*********************************

 

  级并,只要遵循其步,一般问题不大。但是升的情也是屡见,尤其是生产数的升不定的候甚至要SR

  下面描述基于Linux(Oracle Linux 5.4/2.6.18-164.el5PAE)平台下Oracle 10.2.0.1 10.2.0.4的步

  Oracle包的下请链接:Oracle 丁全集 (Oracle 9i 10g 11g Path)

  注:

    9i以前,无/都是startup migrate

    10g后增加了upgrade参数,升可直接用startup upgrade,降仍是startup migrate

 

一、单实例升决条件:

 

1.表空需求

  确保system表空至少有10M可用,下面查询语

          

    col "tablespace_name" for a20

    col "Usage_Percent" for a10

    SELECT upper(f.tablespace_name) "tablespace_name"

         ,d.tot_grootte_mb "tablespace_size(M)"

         ,d.tot_grootte_mb - f.total_bytes "used_size(M)"

         ,to_char(round((d.tot_grootte_mb - f.total_bytes) / d.tot_grootte_mb * 100,

               2),

             '990.99') "Usage_Percent"

         ,f.total_bytes "free_size(M)"

    FROM   (SELECT tablespace_name

            ,round(SUM(bytes) / 1024 / 1024) total_bytes

            ,round(MAX(bytes) / (1024 * 1024), 2) max_bytes

        FROM   sys.dba_free_space

        GROUP  BY tablespace_name) f

        ,(SELECT dd.tablespace_name

            ,round(SUM(bytes) / 1024 / 1024) tot_grootte_mb

        FROM   sys.dba_data_files dd

        GROUP  BY dd.tablespace_name) d

    WHERE  d.tablespace_name = f.tablespace_name

    ORDER  BY 2 DESC;

 

2.统参数

  确保参数SHARED_POOL_SIZE JAVA_POOL_SIZE大于150MB以上,加快升速度,在系统内存可用的情下,可临时调个参数

          SQL> SHOW PARAMETER SHARED_POOL_SIZE

          SQL> SHOW PARAMETER JAVA_POOL_SIZE

          SQL> ALTER SYSTEM SET SHARED_POOL_SIZE='200M' SCOPE=spfile;

          SQL> ALTER SYSTEM SET JAVA_POOL_SIZE='200M' SCOPE=spfile;

 

二、施升

 

1.关闭需要升

  停止

    SQL> shutdown immediate 

  停止与该实例相的所有后台

    lsnrctl emctl

 

2.备份Oracle Home

  tar -cvf $ORACLE_BASE /orabak/    --确保Oracle的所有配置都位于$ORACLE_BASE,如听等

  cp *.dbf con*.ora redo*.log /orabak/  --对数库实施冷

 

3.级软

  ./runIstanller   -->oracle 账户

  root.sh          -->root 账户

 

4.更新据字典

  SQL> startup upgrade

  SQL> spool patch.log

  SQL> @?/rdbms/admin/catupgrd.sql   --9i 使用catpatch.sql

  SQL> spool off

 

5.编译失效象:

  sql>shutdown immediate

  sql>startup

  SQL>@?/rdbms/admin/utlrp.sql

 

6.后的检测

  SQL>select comp_name,version,status from sys.dba_registry;

 

  检查组件的升

  SQL>select * from utl_recomp_errors;

 

7.修改兼容性参数

 

  SQL> alter system set compatible='10.2.0.4.0' scope=spfile;

 

8.重新启动数:

  SQL> SHUTDOWN

  SQL> STARTUP

 

9.如果使用了恢则执行下面的命令

  $ rman catalog username/password@alias

  RMAN> UPGRADE CATALOG;

 

10.回退:

  SQL> STARTUP DOWNGRADE

 

  SQL> SPOOL downgrade.log

 

  SQL> @catdwgrd.sql10.2.10行的是这个,而10.1用的是d92000.sql,即dold_release.sql

 

  Sql>spool off

 

  Sql>shutdown immediate

 

12.检查后的情

 

  SQL> select comp_name,version,status from sys.dba_registry;

 

  COMP_NAME                                VERSION                        STATUS

  ---------------------------------------- ------------------------------ -----------

  Oracle Database Catalog Views            10.2.0.4.0                     VALID

  Oracle Database Packages and Types       10.2.0.4.0                     VALID

  Oracle Workspace Manager                 10.2.0.4.3                     VALID

  JServer JAVA Virtual Machine             10.2.0.4.0                     VALID

  Oracle XDK                               10.2.0.4.0                     VALID

  Oracle Database Java Packages            10.2.0.4.0                     VALID

  Oracle Expression Filter                 10.2.0.4.0                     VALID

  Oracle Data Mining                       10.2.0.4.0                     VALID

  Oracle Text                              10.2.0.4.0                     VALID

  Oracle XML Database                      10.2.0.4.0                     VALID

  Oracle Rule Manager                      10.2.0.4.0                     VALID

 

  COMP_NAME                                VERSION                        STATUS

  ---------------------------------------- ------------------------------ -----------

  Oracle interMedia                        10.2.0.4.0                     VALID

  OLAP Analytic Workspace                  10.2.0.4.0                     VALID

  Oracle OLAP API                          10.2.0.4.0                     VALID

  OLAP Catalog                             10.2.0.4.0                     VALID

  Spatial                                  10.2.0.4.0                     VALID

  Oracle Enterprise Manager                10.2.0.4.0                     VALID

 

  17 rows selected.

 

  SQL> select * from utl_recomp_errors;

 

  no rows selected

 

 

 

你可能感兴趣的:(oracle)