Oracle 10g upgrade 10.2.0.2 -- 10.2.0.4

beatony發表於2010-05-18

一, 軟體清單
   1. operator system
                     Red Hat ES4 update 6(64b)
   2. Oracle 軟體
                    Oracle Database 10g Enterprise Editon Release 10.2.0.1.0
                    Oracle Database 10g Release 2 (10.2.0.4) Patch set 4 for Linux X86
                   
二. 伺服器hosts的檔案內容
              127.0.0.1   UAT1  localhost.localdomain localhost
              192.168.144.221 UAT1

三. 硬體要求:
      1. 記憶體            grep Mem Total/proc/meminfo        >2G
      2. SWAP 分割槽   grep Swap Total/proc/meminfo       >32G
      3. 軟體所需要空間 df -h                                           >4G
      4. 臨時資料夾 / tmp              df -h/tmp                   >2G
     
四. 建立使用者和組

    1. /usr/sbin/groupadd oinstall
    2. /usr/sbin/groupadd dba
    3. /usr/sbin/useradd -g oinstall -G dba Oracle
    4. /usr/sbin/passwd Oracle
    # su - Oracle
    # cd
    vi .bash_profile
    # 新增以下內容:

PATH=$PATH:$HOME/bin
export PATH
export TMP=/tmp
unset USERNAME
ORACLE_BASE=/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_HOME
export ORACLE_SID=uweb
PATH=/usr/sbin:$PATH
PATH=$ORACLE_HOME/bin:$PATH
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export CLASSPATH      


檢查系統包是否缺失: (以下安裝必須)
#rpm -qa | grep glibc
#rpm -qa | grep make
#rpm -qa | grep binutils
#rpm -qa | grep openmotif
#rpm -qa | grep openmotif-devel
#rpm -qa | grep openmotif21
#rpm -qa | grep setarch
#rpm -qa | grep compat-db
#rpm -qa | grep compat-gcc
#rpm -qa | grep compat-gcc-c++
#rpm -qa | grep compat-libstdc++
#rpm -qa | grep compat-libstdc++-devel
#rpm -qa | grep compat-glibc
#rpm -qa | grep gnome-libs
#rpm -qa | grep libstdc++
#rpm -qa | grep gcc
#rpm -qa | grep pdksh
#rpm -qa | grep sysstat
#rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' compat-libstdc++-33  
             
五. ./runstaller
==============================================================================
六. 安裝補丁包.10.2.0.4

Oracle 補丁升級10.2.0.1---10.2.0.4
我想把Oracle10g 10.2.0.1升級到 10.2.0.4 補丁已經獲取到了, 補丁檔名:p6810189_10204_Win32 .

select * from v$version;
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE    10.2.0.1.0      Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production


1) 冷備份資料庫
2) 執行安裝補丁程式
--如果沒有建立資料庫,升級就結束了,如果升級已經建立了資料庫的資料庫,需要執行下面的操作
3) startup upgrade; lsnrctl start
3.1) 修改java_pool_size / large_pool_size=150M
4) 執行指令碼@rdbms/admin/catupgrd.sql
5) shutdown immediate
6) startup
7) 執行指令碼@rdbms/admin/utlrp.sql
8) 其它升級後工作
      如果用到了rman catalog,那麼得升級catalog:
      $ rman catalog
      RMAN> UPGRADE CATALOG;
      執行changePerm.sh放寬新建目錄和檔案的許可權,使其它客戶端能訪問:
      $ cd $ORACLE_HOME/install
      $ ./changePerm.sh
9) --察看資料庫安裝的元件、版本、狀態:
col comp_name format a30
col version format a30
col status format a10
SELECT comp_name, version, status&nbsp FROM dba_registry;

    COMP_NAME                                           VERSION      STATUS
------------------------------ ----------                        ----------        ------------
Oracle Enterprise Manager                        10.2.0.4.0      VALID
Oracle interMedia                                     10.2.0.4.0      VALID
Oracle XML Database                               10.2.0.4.0      VALID
Oracle Expression Filter                            10.2.0.4.0      VALID
Oracle Rule Manager                                 10.2.0.4.0      VALID
Oracle Workspace Manager                      10.2.0.4.3      VALID
Oracle Database Catalog Views                10.2.0.4.0      VALID
Oracle Database Packages and Types       10.2.0.4.0      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

===end===
================================================================================
QA :

① 作業系統驗證不透過  check operator system version: must be redhat_3, Suse_9 radhat_4 等.
==> vi  /Disk1/install/oraparam.ini 加入redhat_5 即可.

②. *.cpio 壓縮檔案解壓:
==> cpio -idcmv 

③.Error in wrintting to file '/oracle/product/10.2.0/db_1/bin/sqlplus'  [sqlplus test file busy ]\
==> 找到該程式,殺死該程式即可.
ps -ef|grep sqlplus
kill -9 16258

④.
1、檢視資料庫版本
SQL> select banner from .v$version;
 
BANNER
----------------------------------------------------------
Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production
PL/SQL Release 8.1.6.0.0 - Production
CORE 8.1.6.0.0    Production
TNS for 32-bit Windows: Version 8.1.6.0.0 - Production
NLSRTL Version 3.4.1.0.0 - Production
 
2、檢視安裝了哪些選項
SQL> col PARAMETER format a60
SQL> col VALUE format a10
SQL> select * from v$option;
 
PARAMETER                                                 VALUE
------------------------------------------------------------ ----------
Partitioning                                              TRUE
Objects                                                    TRUE
Parallel Server                                           FALSE
Advanced replication                                         TRUE
Bit-mapped indexes                                        TRUE
Connection multiplexing                                      TRUE
Connection pooling                                        TRUE
Database queuing                                           TRUE
Incremental backup and recovery                            TRUE
Instead-of triggers                                        TRUE
Parallel backup and recovery                               TRUE
 
PARAMETER                                                 VALUE
------------------------------------------------------------ ----------
Parallel execution                                        TRUE
Parallel load                                              TRUE
Point-in-time tablespace recovery                         TRUE
Fine-grained access control                               TRUE
N-Tier authentication/authorization                          TRUE
Function-based indexes                                     TRUE
Plan Stability                                               TRUE
Online Index Build                                        TRUE
Coalesce Index                                               TRUE
Managed Standby                                           TRUE
Materialized view rewrite                                  TRUE
 
PARAMETER                                                 VALUE
------------------------------------------------------------ ----------
Materialized view warehouse refresh                          TRUE
Database resource manager                                  TRUE
Spatial                                                    TRUE
Visual Information Retrieval                               TRUE
Export transportable tablespaces                             TRUE
Transparent Application Failover                             TRUE
Fast-Start Fault Recovery                                  TRUE
Sample Scan                                                  TRUE
Duplexed backups                                           TRUE
Java                                                       FALSE
OLAP Window Functions                                     TRUE
 
已選擇33行。
 
SQL> set head off feed off pages 0 serveroutput on
SQL> begin
2    dbms_output.put_line('Port String: '||dbms_utility.port_string);
3   end;
4   /
Port String: IBMPC/WIN_NT-8.1.0

==========================================
⑤.
 Linux下完全解除安裝ORACLE 10G的方法

 1. 執行 $ORACLE_HOME/bin/localconfig delete
2. rm -rf $ORACLE_BASE/*
3. rm -f /etc/oraInst.loc /etc/oratab
4. rm -rf /etc/oracle
5. rm -f /etc/inittab.cssd
6. rm -f /usr/local/bin/coraenv /usr/local/bin/dbhome /usr/local/bin/oraenv
7. 刪除oracle使用者和組。

此方法同樣適用與AIX系統,已經測試,其他平臺沒有驗證過。
                  

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22578826/viewspace-663043/,如需轉載,請註明出處,否則將追究法律責任。

相關文章