打补丁

来源:互联网 发布:淘宝旺旺怎么下载 编辑:程序博客网 时间:2024/04/29 13:42

[oracle@bj ~]$ sqlplus -v
SQL*Plus: Release 10.2.0.1.0 - Production

p6810189_10204_Linux-x86

patch_note.htm

6 System Requirements

The following are the system requirements for this patch set:

  • Operating System

    • Asianux 1.0

    • Asianux 2.0

    • Asianux 3.0

    • Oracle Enterprise Linux 4.0/Oracle VM

    • Oracle Enterprise Linux 5.0/Oracle VM

    • Red Hat Enterprise Linux AS/ES 3.0

    • Red Hat Enterprise Linux AS/ES 4.0/Oracle VM

    • Red Hat Enterprise Linux AS/ES 5.0/Oracle VM

    • SUSE Linux Enterprise Server (SLES) 9

    • SUSE Linux Enterprise Server (SLES) 10

  • Oracle Database 10g (10.2.0.1) or later

[root@bj ~]# lsb_release -a
LSB Version: :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 5.2 (Tikanga)
Release: 5.2
Codename: Tikanga

7.4 Download and Extract the Installation Software

To download and extract the patch set installation software:

  1. Download the p6810189_10204_LINUX.zip patch set installation archive to a directory that is not the Oracle home directory or under the Oracle home directory.

  2. Enter the following command to unzip and extract the installation files:

    $ unzip p6810189_10204_LINUX.zip
 p6810189_10204_LINUX.zip不要放在oracle home目录

[root@bj home]# pwd
/home
[root@bj home]# ls
oracle  p6810189_10204_Linux-x86.zip
[root@bj home]# unzip p6810189_10204_Linux-x86.zip 

7.5 Update Oracle Time Zone Definitions

  1. When patching from a lower 10.2 release or upgrading from 10.1.0.X directly to 10.2.0.4, 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; in this case, continue with steps described in section 7.6.

    • If this reports a version lower or higher then 4, see OracleMetalink document 553812.1 "Actions for the DSTv4 update in the Release 10.2.0.4 patchset".

SQL> select version from v$timezone_file;   
   VERSION
----------
2

7.6 Set the ORACLE_HOME and ORACLE_SID Environment Variables

Enter the following commands to set the ORACLE_HOME and ORACLE_SID environment variables:

  • Bourne, Bash, or Korn shell:

    $ ORACLE_HOME=Oracle_home$ ORACLE_SID=sid$ export ORACLE_HOME ORACLE_SID
  • C shell:

    % setenv ORACLE_HOME Oracle_home% setenv ORACLE_SID sid

In these examples, Oracle_home is the Oracle home directory where the Oracle Database 10g installation that you want to upgrade is installed, and sid is the system identifier of the database that you want to upgrade. For Oracle RAC installations, sid is generally the sid prefix and the instance number. For example, ORCL1.

[root@bj ~]# su - oracle
[oracle@bj ~]$ env | grep ORA
ORACLE_SID=RAC1
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1     //默认已经设置好的,因安装数据库的时候已经做过此步骤。

7.7 Stop All Processes

7.7.1 Stopping All Processes for a Single Instance Installation

Shut down the following Oracle Database 10g processes in the order specified before installing the patch set:

  1. Shut down all processes in the Oracle home that might be accessing a database, for example Oracle Enterprise Manager Database Control or iSQL*Plus:

    $ emctl stop dbconsole$ isqlplusctl stop$ lsnrctl stop

    Note:

    Before you shut down all processes that are monitored by Oracle Enterprise Manager Grid Control, set a blackout in Grid Control for the processes that you intend to shut down. This is necessary so that the availability records for these processes indicate that the shutdown was planned downtime rather than an unplanned system outage.
  2. Shut down all database instances running in the Oracle home directory, where you need to install the patch set.

  3. Shut down all listeners running in the Oracle home directory, where you need to install the patch set.

  4. If there is an Automatic Storage Management instance present, then enter the following command to set the values for the environment variables $ORACLE_HOME and $ORACLE_SID:

    • Bourne, Bash, or Korn shell:

      $ export ORACLE_SID=+ASM$ export ORACLE_HOME=ASM_HOME
    • C shell:

      % setenv ORACLE_SID +ASM% setenv ORACLE_HOME ASM_HOME

    Enter the following command to Shut down the Automatic Storage Management instance:

    $ sqlplus /NOLOGSQL> CONNECT SYS AS SYSDBAEnter password:SYS_passwordSQL> SHUTDOWN IMMEDIATE
  5. For Automatic Storage Management, to shut down the Oracle Cluster Synchronization Services daemon enter the following command as the root user:

    # $ORACLE_HOME/bin/crsctl stop crs
[oracle@bj home]$ emctl stop dbconsole
TZ set to PRC
OC4J Configuration issue. /u01/app/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_bj_RAC1 not found. 
[oracle@bj home]$ isqlplusctl stop
iSQL*Plus 10.2.0.1.0
Copyright (c) 2003, 2005, Oracle.  All rights reserved.
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
iSQL*Plus instance on port 5560 is not running ...

[oracle@bj home]$ lsnrctl stop
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 01-JUN-2014 17:22:28
Copyright (c) 1991, 2005, Oracle.  All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
The command completed successfully

关闭数据库实例,如果有ASM存储,关闭ASM实例

SQL> conn /as sysdba
Connected.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

查看是否还有其他oracle进程存在

[root@bj home]# ps aux | grep oracle

7.8 Back Up the System




0 0
原创粉丝点击