设为首页 收藏本站
查看: 435|回复: 0

[经验分享] Oracle database 11.2.0.1 升级至 11.2.0.3

[复制链接]
累计签到:1 天
连续签到:1 天
发表于 2015-9-18 11:40:25 | 显示全部楼层 |阅读模式
首先下载Oracle 11.2.0.3 Patchset
http://yunpan.cn/cHgQuIuxUTThS
访问密码 043f
将Patchset上传至服务器

1
2
[oracle@localhost ~]$ ls
p10404530_112030_Linux-x86-64_1of7.zip  p10404530_112030_Linux-x86-64_2of7.zip



解压安装包

1
2
[oracle@localhost ~]$ unzip p10404530_112030_Linux-x86-64_1of7.zip
[oracle@localhost ~]$ unzip p10404530_112030_Linux-x86-64_2of7.zip



进入安装目录

1
2
3
[oracle@localhost ~]$ cd database/
[oracle@localhost database]$ ls
doc  install  readme.html  response  rpm  runInstaller  sshsetup  stage  welcome.html



一、安装11.2.0.3 只安装软件软件
运行runInstaller
1
2
[oracle@localhost database]$ export ORACLE_HOME="/u01/app/oracle/product/11.2.0.3/db_1"
[oracle@localhost database]$ ./runInstaller



wKiom1X6xQOAEkq5AAI68mJHLw8082.jpg
选择只安装软件选项
wKioL1X6x4HCfc_eAALVUK1eSa0423.jpg
选择新的ORACLE_HOME

二、安装完毕11.2.0.3后,需要运行脚本执行升级前的预检查。
1
2
3
[iyunv@localhost ~]# su - oracle
[oracle@localhost ~]$ export | grep ORACLE_HOME
declare -x ORACLE_HOME="/u01/app/oracle/product/11.2.0.1/db_1"



注意,使用旧版本登录数据库
1
2
3
SQL> SPOOL upgrade_info.log
SQL> @/u01/app/oracle/product/11.2.0.3/db_1/rdbms/admin/utlu112i.sql   
SQL> SPOOL OFF



日志如下
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
Oracle Database 11.2 Pre-Upgrade Information Tool 09-17-2015 22:13:08
Script Version: 11.2.0.3.0 Build: 001
.
**********************************************************************
Database:
**********************************************************************
--> name:      ORCL
--> version:       11.2.0.1.0
--> compatible:    11.2.0.0.0
--> blocksize:     8192
--> platform:      Linux x86 64-bit
--> timezone file: V11
.
**********************************************************************
Tablespaces: [make adjustments in the current environment]
**********************************************************************
--> SYSTEM tablespace is adequate for the upgrade.
.... minimum required size: 681 MB
--> SYSAUX tablespace is adequate for the upgrade.
.... minimum required size: 468 MB
--> UNDOTBS1 tablespace is adequate for the upgrade.
.... minimum required size: 400 MB
--> TEMP tablespace is adequate for the upgrade.
.... minimum required size: 60 MB
.
**********************************************************************
Flashback: OFF
**********************************************************************
**********************************************************************
Update Parameters: [Update Oracle Database 11.2 init.ora or spfile]
Note: Pre-upgrade tool was run on a lower version 64-bit database.
**********************************************************************
--> If Target Oracle is 32-Bit, refer here for Update Parameters:
-- No update parameter changes are required.
.

--> If Target Oracle is 64-Bit, refer here for Update Parameters:
-- No update parameter changes are required.
.
**********************************************************************
Renamed Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
-- No renamed parameters found. No changes are required.
.
**********************************************************************
Obsolete/Deprecated Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
-- No obsolete parameters found. No changes are required
.

**********************************************************************
Components: [The following database components will be upgraded or installed]
**********************************************************************
--> Oracle Catalog Views   [upgrade]  VALID
--> Oracle Packages and Types     [upgrade]  VALID
--> JServer JAVA Virtual Machine [upgrade]  VALID
--> Oracle XDK for Java      [upgrade]  VALID
--> Oracle Workspace Manager   [upgrade]  VALID
--> OLAP Analytic Workspace    [upgrade]  VALID
--> OLAP Catalog        [upgrade]  VALID
--> EM Repository       [upgrade]  VALID
--> Oracle Text        [upgrade]  VALID
--> Oracle XML Database   [upgrade]  VALID
--> Oracle Java Packages   [upgrade]  VALID
--> Oracle interMedia       [upgrade]  VALID
--> Spatial          [upgrade]  VALID
--> Expression Filter       [upgrade]  VALID
--> Rule Manager        [upgrade]  VALID
--> Oracle Application Express     [upgrade]  VALID
... APEX will only be upgraded if the version of APEX in
... the target Oracle home is higher than the current one.
--> Oracle OLAP API        [upgrade]  VALID
.
**********************************************************************
Miscellaneous Warnings
**********************************************************************
WARNING: --> Database is using a timezone file older than version 14.
.... After the release migration, it is recommended that DBMS_DST package
.... be used to upgrade the 11.2.0.1.0 database timezone version
.... to the latest version which comes with the new release.
WARNING: --> Your recycle bin is turned on and currently contains no objects.
.... Because it is REQUIRED that the recycle bin be empty prior to upgrading
.... and your recycle bin is turned on, you may need to execute the command:
    PURGE DBA_RECYCLEBIN
.... prior to executing your upgrade to confirm the recycle bin is empty.
WARNING: --> Database contains schemas with objects dependent on DBMS_LDAP package.
.... Refer to the 11g Upgrade Guide for instructions to configure Network ACLs.
.... USER APEX_030200 has dependent objects.
.
**********************************************************************
Recommendations
**********************************************************************
Oracle recommends gathering dictionary statistics prior to
upgrading the database.
To gather dictionary statistics execute the following command
while connected as SYSDBA:

    EXECUTE dbms_stats.gather_dictionary_stats;

**********************************************************************
Oracle recommends reviewing any defined events prior to upgrading.

To view existing non-default events execute the following commands
while connected AS SYSDBA:
  Events:
    SELECT (translate(value,chr(13)||chr(10),' ')) FROM sys.v$parameter2
      WHERE  UPPER(name) ='EVENT' AND  isdefault='FALSE'

  Trace Events:
    SELECT (translate(value,chr(13)||chr(10),' ')) from sys.v$parameter2
      WHERE UPPER(name) = '_TRACE_EVENTS' AND isdefault='FALSE'

Changes will need to be made in the init.ora or spfile.

**********************************************************************




按照日志要求,执行数据库字典统计

1
EXECUTE dbms_stats.gather_dictionary_stats;



1
2
3
SQL>  SELECT (translate(value,chr(13)||chr(10),' ')) FROM sys.v$parameter2 WHERE  UPPER(name) ='EVENT' AND  isdefault='FALSE';

no rows selected



1
2
3
SQL> SELECT (translate(value,chr(13)||chr(10),' ')) from sys.v$parameter2 WHERE UPPER(name) = '_TRACE_EVENTS' AND isdefault='FALSE';

no rows selected




三、配置新版的LISTENER

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[oracle@localhost bin]$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0.3/db_1
[oracle@localhost bin]$ export TNS_ADMIN="/u01/app/oracle/product/11.2.0.3/db_1/network/admin"
[oracle@localhost ~]$ cd /u01/app/oracle/product/11.2.0.3/db_1/bin/
[oracle@localhost bin]$ ./netmgr
[oracle@localhost bin]$ cd /u01/app/oracle/product/11.2.0.3/db_1/network/admin
[oracle@localhost admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0.3/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = orcl)
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0.3/db_1)
      (SID_NAME = orcl)
    )
  )

LISTENER =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.199.240)(PORT = 1521))
  )

ADR_BASE_LISTENER = /u01/app/oracle



关闭旧listener
1
2
3
4
5
6
7
8
[oracle@localhost ~]$ lsnrctl stop

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 17-SEP-2015 22:54:22

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.199.240)(PORT=1521)))
The command completed successfully



启动新listener
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
[oracle@localhost admin]$ cd /u01/app/oracle/product/11.2.0.3/db_1/bin/
[oracle@localhost bin]$ ./lsnrctl start

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 17-SEP-2015 22:52:47

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

Starting /u01/app/oracle/product/11.2.0.3/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.3.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0.3/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.199.240)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.199.240)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date                17-SEP-2015 22:52:47
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0.3/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.199.240)(PORT=1521)))
Services Summary...
Service "orcl" has 1 instance(s).
  Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully




四、执行dbua
1
2
3
[oracle@localhost bin]$ pwd
/u01/app/oracle/product/11.2.0.3/db_1/bin
[oracle@localhost bin]$ ./dbua



wKiom1X61WCAjwKjAAJmsjKEkYY854.jpg
点击Next
wKioL1X61-DA_3heAAIpOrNEnfo841.jpg 点击Next
wKiom1X61jDTdk-hAAJqNQ0R_JI490.jpg
wKioL1X62HLAqEBXAAMsDrKvKXI116.jpg
点击Yes
wKioL1X62M7yuXCyAANgCZmZhns466.jpg
你可以选择进行Timezone更新,也可以选择备份数据库。点击Next
wKiom1X61vXgYTtTAAK9nNMIkd4905.jpg
点击Next
wKiom1X61yXjWJahAALJpkzCjmo386.jpg
点击Next
wKioL1X62YaC7BCmAAP6caf00d4607.jpg 点击Finish
wKioL1X62c3BVGvqAAInKOHiinU606.jpg
wKiom1X65z-wNGy8AAJWaVejia0271.jpg
点击OK
wKioL1X66dOQzP5kAANbgRwB3Ik363.jpg
检查升级结果,如果没有错误,升级完成。

修改ORACLE_HOME环境变量,指向新的Oracle home

1
2
[oracle@localhost ~]$ vi .bash_profile
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0.3/db_1



修改/etc/oratab
1
2
[oracle@localhost ~]$ vi /etc/oratab
orcl:/u01/app/oracle/product/11.2.0.3/db_1:N



运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-115339-1-1.html 上篇帖子: oracle 数据库无法启动,报错 terminating the instance due to error 16014 下篇帖子: 使用DATABASE Log off收集oracle 等待事件信息 database Oracle
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表