admin 管理员组

文章数量: 887021


2023年12月23日发(作者:xlm文件怎么打开)

Linux平台Oracle 11.2.0.1.0

升级 11.2.0.4.0 操作参考

Version 1.10

关键字:Database、Update、Upgrade、Patchset

2017年1月9日

Linux平台Oracle 11.2.0.1.0 升级 11.2.0.4.0 操作参考 2 / 18

版本控制

版本号

1.0

1.1

1.2

1.3

1.4

1.5

1.6

欢迎来函交流,请MAIL至

变更内容

Create:创建文档,环境准备、测试

Operate:安装配置Oracle 11.2.0.1.0

Operate:升级Oracle 11.2.0.4.0

Publish:审阅

Publish:发布,内部研究

Publish:总览全文,修订

Publish:发布,公网

日期

2016.1.21

2016.1.22

2016.1.22

2016.1.22

2016.1.22

2017.1.6

2017.1.6

Linux平台Oracle 11.2.0.1.0 升级 11.2.0.4.0 操作参考 3 / 18

目录

1

2

3

4

5

6

环境信息 ................................................................................................................................... 4

安装部署源数据库 ................................................................................................................... 4

升级前的准备 ........................................................................................................................... 6

升级数据库 ............................................................................................................................... 9

升级后的验证 ......................................................................................................................... 18

增补资料 ................................................................................................................................. 18

Linux平台Oracle 11.2.0.1.0 升级 11.2.0.4.0 操作参考 4 / 18

1 环境信息

1) 操作系统

Oracle Enterprise Linux 5.8 64bit

2) 升级前源数据库

Oracle 11.2.0.1.0

3) 升级后目标数据库

Oracle 11.2.0.4.0

4) 从MOS获取11.2.0.4.0安装包

p13390677_112040_Linux-x86-64_

p13390677_112040_Linux-x86-64_

详细版本

ORACLE_SID

ORACLE_BASE

ORACLE_HOME

11.2.0.1.0

orcl

/oracle/oraclebase

/oracle/oraclebase/db11.2.1.0

源数据库

11.2.0.4.0

orcl

/oracle/oraclebase

/oracle/oraclebase/db11.2.0.4.0

目标数据库

2 安装部署源数据库

此部分内容请参阅本人相关知识库文档,本文不再赘述。

1) 源数据库/home/oracle/.bash_profile

[root@ol58 ~]# cat /home/oracle/.bash_profile

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

. ~/.bashrc

fi

# User specific environment and startup programs

ORACLE_SID=orcl

Linux平台Oracle 11.2.0.1.0 升级 11.2.0.4.0 操作参考 5 / 18

export ORACLE_SID

ORACLE_BASE=/oracle/oraclebase

export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/db11.2.0.1.0

export ORACLE_HOME

LD_LIBRARY_PATH=$ORACLE_HOME/lib

export LD_LIBRARY_PATH

PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin

export PATH

安装部署妥当后,源数据库相关信息如下。

2) 查询版本信息

SQL> select * from v$version;

BANNER

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

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

PL/SQL Release 11.2.0.4.0 - Production

CORE 11.2.0.4.0 Production

TNS for Linux: Version 11.2.0.4.0 - Production

NLSRTL Version 11.2.0.4.0 - Production

Linux平台Oracle 11.2.0.1.0 升级 11.2.0.4.0 操作参考 6 / 18

3 升级前的准备

1) 升级前先备份当前数据库

[oracle@ol58 ~]$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Mon Feb 1 19:37:36 2016

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

connected to target database: ORCL (DBID=1429779892)

RMAN> backup as compressed backupset database plus archivelog;

Starting backup at 01-FEB-16

current log archived

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=6 device type=DISK

channel ORA_DISK_1: starting compressed archived log backup set

channel ORA_DISK_1: specifying archived log(s) in backup set

input archived log thread=1 sequence=7 RECID=1 STAMP=901999520

input archived log thread=1 sequence=8 RECID=2 STAMP=902691503

channel ORA_DISK_1: starting piece 1 at 01-FEB-16

channel ORA_DISK_1: finished piece 1 at 01-FEB-16

piece

handle=/oracle/oraclebase/fast_recovery_area/ORCL/backupset/2016_02_01/o1_mf_annnn_TAG20160201T193824_cbyjxk6r_.bkp tag=TAG20160201T193824 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07

Finished backup at 01-FEB-16

Starting backup at 01-FEB-16

using channel ORA_DISK_1

channel ORA_DISK_1: starting compressed full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00001

name=/oracle/oraclebase/oradata/ORCL/datafile/o1_mf_system_cb9dqfns_.dbf

input datafile file number=00002

name=/oracle/oraclebase/oradata/ORCL/datafile/o1_mf_sysaux_cb9dqfqg_.dbf

input datafile file number=00005

name=/oracle/oraclebase/oradata/ORCL/datafile/o1_mf_example_cb9dt258_.dbf

input datafile file number=00003

name=/oracle/oraclebase/oradata/ORCL/datafile/o1_mf_undotbs1_cb9dqfrd_.dbf

input datafile file number=00004

name=/oracle/oraclebase/oradata/ORCL/datafile/o1_mf_users_cb9dqfst_.dbf

channel ORA_DISK_1: starting piece 1 at 01-FEB-16

Linux平台Oracle 11.2.0.1.0 升级 11.2.0.4.0 操作参考 7 / 18

channel ORA_DISK_1: finished piece 1 at 01-FEB-16

piece

handle=/oracle/oraclebase/fast_recovery_area/ORCL/backupset/2016_02_01/o1_mf_nnndf_TAG20160201T193832_cbyjxs39_.bkp tag=TAG20160201T193832 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:02:26

channel ORA_DISK_1: starting compressed full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

including current control file in backup set

including current SPFILE in backup set

channel ORA_DISK_1: starting piece 1 at 01-FEB-16

channel ORA_DISK_1: finished piece 1 at 01-FEB-16

piece

handle=/oracle/oraclebase/fast_recovery_area/ORCL/backupset/2016_02_01/o1_mf_ncsnf_TAG20160201T193832_cbyk2f4p_.bkp tag=TAG20160201T193832 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 01-FEB-16

Starting backup at 01-FEB-16

current log archived

using channel ORA_DISK_1

channel ORA_DISK_1: starting compressed archived log backup set

channel ORA_DISK_1: specifying archived log(s) in backup set

input archived log thread=1 sequence=9 RECID=3 STAMP=902691662

channel ORA_DISK_1: starting piece 1 at 01-FEB-16

channel ORA_DISK_1: finished piece 1 at 01-FEB-16

piece

handle=/oracle/oraclebase/fast_recovery_area/ORCL/backupset/2016_02_01/o1_mf_annnn_TAG20160201T194102_cbyk2gdw_.bkp tag=TAG20160201T194102 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 01-FEB-16

2) 关闭数据库实例

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

3) 停止监听

C:Userscr>lsnrctl stop

LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 21-1月 -2016 17:2

1:34

Copyright (c) 1991, 2010, Oracle. All rights reserved.

正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=cr-PC)(PORT=1521)))

命令执行成功

Linux平台Oracle 11.2.0.1.0 升级 11.2.0.4.0 操作参考 8 / 18

4) 停止EM

C:Userscr>set oracle_unqname=orcl

C:Userscr>emctl stop dbconsole

Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0

Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.

cr-PC:1158/em/console/aboutApplication

OracleDBConsoleorcl 服务正在停止.........

OracleDBConsoleorcl 服务已成功停止。

5) 将11.2.0.4.0补丁包传输到相关目录,并解压

Linux平台Oracle 11.2.0.1.0 升级 11.2.0.4.0 操作参考 9 / 18

4 升级数据库

1) 运行升级程序

详细安装过程请参见本人相关知识库文档,此处不再赘述。

2) 升级现有数据库

Linux平台Oracle 11.2.0.1.0 升级 11.2.0.4.0 操作参考 10 / 18

3) 配置安装目录

ORACLE_BASE目录不变,ORACLE_HOME目录要指定新位置。

4) 配置监听

安装过程中,程序会跳出监听配置程序,配置方法和原有一样。

Linux平台Oracle 11.2.0.1.0 升级 11.2.0.4.0 操作参考 11 / 18

5) 数据库升级助手

6) 选择orcl实例

Linux平台Oracle 11.2.0.1.0 升级 11.2.0.4.0 操作参考 12 / 18

7) 忽略警告

Linux平台Oracle 11.2.0.1.0 升级 11.2.0.4.0 操作参考 13 / 18

8) 升级选项

9) 配置快速闪回区

Linux平台Oracle 11.2.0.1.0 升级 11.2.0.4.0 操作参考 14 / 18

10) 数据库升级概要

Linux平台Oracle 11.2.0.1.0 升级 11.2.0.4.0 操作参考 15 / 18

11) 开始升级数据库,请耐心等待

12) 数据库升级顺利完成

Linux平台Oracle 11.2.0.1.0 升级 11.2.0.4.0 操作参考 16 / 18

13) 检查升级结果

Linux平台Oracle 11.2.0.1.0 升级 11.2.0.4.0 操作参考 17 / 18

14) 关闭升级程序

Linux平台Oracle 11.2.0.1.0 升级 11.2.0.4.0 操作参考 18 / 18

5 升级后的验证

1) 检查数据库版本

SQL> select * from v$version;

BANNER

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

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

PL/SQL Release 11.2.0.4.0 - Production

CORE 11.2.0.4.0 Production

TNS for 64-bit Windows: Version 11.2.0.4.0 - Production

NLSRTL Version 11.2.0.4.0 - Production

2) 检查数据库升级历史

select ACTION_TIME,ACTION,VERSION,COMMENTS from dba_registry_history;

6 增补资料


本文标签: 升级 数据库 操作