oracle11.2.0.3升级至11.2.0.4单机版
由于客户的环境有的比较老,数据库版本还停留在11.2.0.3版本,随着数据库的更新换代,以及方便以后升级到12或者18,19乃至更高的数据库版本,客户决定先升级数据库版本到11.2.0.4,于是在升级之前先在测试环境做一个测试,同时可以发现一些需要特别注意的点,在实际操作中避免失误。
查看操作系统信息
uname-a
查看数据库各个组件版本信息
~]$ sqlplus / as sysdba: Release 11.2.0.3.0 Production on Fri Jan 1 13:13:59 2021Copyright (c) 1982, 2011, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsselect comp_name,status,version from dba_server_registry;COMP_NAME--------------------------------------------------------------------------------STATUS VERSION------------------------------OWBVALID 11.2.0.3.0Oracle Application ExpressVALID 3.2.1.00.12Oracle Enterprise ManagerVALID 11.2.0.3.0COMP_NAME--------------------------------------------------------------------------------STATUS VERSION------------------------------OLAP CatalogVALID 11.2.0.3.0SpatialVALID 11.2.0.3.0Oracle MultimediaVALID 11.2.0.3.0COMP_NAME--------------------------------------------------------------------------------STATUS VERSION------------------------------Oracle XML DatabaseVALID 11.2.0.3.0Oracle TextVALID 11.2.0.3.0Oracle Expression FilterVALID 11.2.0.3.0COMP_NAME--------------------------------------------------------------------------------STATUS VERSION------------------------------Oracle Rules ManagerVALID 11.2.0.3.0Oracle Workspace ManagerVALID 11.2.0.3.0Oracle Database Catalog ViewsVALID 11.2.0.3.0COMP_NAME--------------------------------------------------------------------------------STATUS VERSION------------------------------Oracle Database Packages and TypesVALID 11.2.0.3.0JServer JAVA Virtual MachineVALID 11.2.0.3.0Oracle XDKVALID 11.2.0.3.0COMP_NAME--------------------------------------------------------------------------------STATUS VERSION------------------------------Oracle Database Java PackagesVALID 11.2.0.3.0OLAP Analytic WorkspaceVALID 11.2.0.3.0Oracle OLAP APIVALID 11.2.0.3.018 rows selected.SQL>
rman备份数据库
u02]$ rman target /Recovery Manager: Release 11.2.0.3.0 - Production on Fri Jan 1 13:23:49 2021Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.connected to target database: ORCL (DBID=1588474417)run{allocate channel c1 type disk;allocate channel c2 type disk;backup filesperset 2 database format /u02/full_%d_%T_%s_%p;sql alter system archive log current;sql alter system archive log current;sql alter system archive log current;backup 2> 3> 4> 5> 6> 7> 8> archivelog all format /u02/arch_%d_%T_%s_%p delete input;backup current controlfile format /u02/ctl_%d_%T_%s_%p;BACKUP as compressed backupset FORMAT /u02/spfile_%s_%p_%t spfile;10> 11>using target database control file instead of recovery catalogallocated channel: c1channel c1: SID=28 device type=DISKallocated channel: c2channel c2: SID=27 device type=DISKStarting backup at 01-JAN-21channel c1: starting full datafile backup setchannel c1: specifying datafile(s) in backup setinput datafile file number=00001 name=/u01/app/orcl/oradata/orcl/system01.dbfinput datafile file number=00004 name=/u01/app/orcl/oradata/orcl/users01.dbfchannel c1: starting piece 1 at 01-JAN-21channel c2: starting full datafile backup setchannel c2: specifying datafile(s) in backup setinput datafile file number=00002 name=/u01/app/orcl/oradata/orcl/sysaux01.dbfinput datafile file number=00003 name=/u01/app/orcl/oradata/orcl/undotbs01.dbfchannel c2: starting piece 1 at 01-JAN-21channel c1: finished piece 1 at 01-JAN-21piece handle=/u02/full_ORCL_20210101_13_1 tag=TAG20210101T132358 comment=NONEchannel c1: backup set complete, elapsed time: 00:00:03channel c1: starting full datafile backup setchannel c1: specifying datafile(s) in backup setchannel c2: finished piece 1 at 01-JAN-21piece handle=/u02/full_ORCL_20210101_14_1 tag=TAG20210101T132358 comment=NONEchannel c2: backup set complete, elapsed time: 00:00:03channel c2: starting full datafile backup setchannel c2: specifying datafile(s) in backup setincluding current SPFILE in backup setchannel c2: starting piece 1 at 01-JAN-21including current control file in backup setchannel c1: starting piece 1 at 01-JAN-21channel c2: finished piece 1 at 01-JAN-21piece handle=/u02/full_ORCL_20210101_16_1 tag=TAG20210101T132358 comment=NONEchannel c2: backup set complete, elapsed time: 00:00:00channel c1: finished piece 1 at 01-JAN-21piece handle=/u02/full_ORCL_20210101_15_1 tag=TAG20210101T132358 comment=NONEchannel c1: backup set complete, elapsed time: 00:00:01Finished backup at 01-JAN-21sql statement: alter system archive log currentsql statement: alter system archive log currentsql statement: alter system archive log currentStarting backup at 01-JAN-21current log archivedchannel c1: starting archived log backup setchannel c1: specifying archived log(s) in backup setinput archived log thread=1 sequence=8 RECID=5 STAMP=1060694642input archived log thread=1 sequence=9 RECID=6 STAMP=1060694642channel c1: starting piece 1 at 01-JAN-21channel c2: starting archived log backup setchannel c2: specifying archived log(s) in backup setinput archived log thread=1 sequence=10 RECID=7 STAMP=1060694642input archived log thread=1 sequence=11 RECID=8 STAMP=1060694642channel c2: starting piece 1 at 01-JAN-21channel c1: finished piece 1 at 01-JAN-21piece handle=/u02/arch_ORCL_20210101_17_1 tag=TAG20210101T132402 comment=NONEchannel c1: backup set complete, elapsed time: 00:00:00channel c1: deleting archived log(s)archived log file name=/u01/app/orcl/product/11.2.3/dbhome_1/dbs/arch1_8_1060693684.dbf RECID=5 STAMP=1060694642archived log file name=/u01/app/orcl/product/11.2.3/dbhome_1/dbs/arch1_9_1060693684.dbf RECID=6 STAMP=1060694642channel c2: finished piece 1 at 01-JAN-21piece handle=/u02/arch_ORCL_20210101_18_1 tag=TAG20210101T132402 comment=NONEchannel c2: backup set complete, elapsed time: 00:00:00channel c2: deleting archived log(s)archived log file name=/u01/app/orcl/product/11.2.3/dbhome_1/dbs/arch1_10_1060693684.dbf RECID=7 STAMP=1060694642archived log file name=/u01/app/orcl/product/11.2.3/dbhome_1/dbs/arch1_11_1060693684.dbf RECID=8 STAMP=1060694642Finished backup at 01-JAN-21Starting backup at 01-JAN-21channel c1: starting full datafile backup setchannel c1: specifying datafile(s) in backup setincluding current control file in backup setchannel c1: starting piece 1 at 01-JAN-21channel c1: finished piece 1 at 01-JAN-21piece handle=/u02/ctl_ORCL_20210101_19_1 tag=TAG20210101T132402 comment=NONEchannel c1: backup set complete, elapsed time: 00:00:01Finished backup at 01-JAN-21Starting backup at 01-JAN-21channel c1: starting compressed full datafile backup setchannel c1: specifying datafile(s) in backup setincluding current SPFILE in backup setchannel c1: starting piece 1 at 01-JAN-21channel c1: finished piece 1 at 01-JAN-21piece handle=/u02/spfile_20_1_1060694644 tag=TAG20210101T132404 comment=NONEchannel c1: backup set complete, elapsed time: 00:00:01Finished backup at 01-JAN-21released channel: c1released channel: c2RMAN>
关库关监听
u02]$ sqlplus / as sysdba: Release 11.2.0.3.0 Production on Fri Jan 1 13:26:23 2021Copyright (c) 1982, 2011, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsshutdown immediate;Database closed.Database dismounted.ORACLE instance shut down.SQL>
关闭监听
[oracle@lisai u02]$ lsnrctl stopLSNRCTL for Linux: Version 11.2.0.3.0 - Production on 01-JAN-2021 13:31:51Copyright (c) 1991, 2011, Oracle. All rights reserved.Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=lisai)(PORT=1521)))The command completed successfully[oracle@lisai u02]$
备份/u01目录
[root@lisai~]# tar -cvf u01.zip /u01
拷贝监听配置文件
执行SQL
运行catupgrd.sql进行实例升级
@?/rdbms/admin/catupgrd.sql
运行utlrp.sql编译失效对象
@?/rdbms/admin/utlrp
验证升级是否完成
查看各个组件版本
selectcomp_name,status,version from dba_server_registry;
查看有无失效对象
select * fromdba_objects where status !=VALID;
补丁安装完执行应用补丁
@catbundle.sql psuapply
总结(过程中需要特别注意的点)
1.升级前的准备
升级之前做好oracle之前安装目录以及数据库的备份,升级过程中如果有问题,可以先回退,排查问题后再次升级。
2.升级完以后的注意事项
首先检查各个组件的升级情况,没问题后编译失效对象。以及根据需要安装新版本的补丁集。都做完以后,验证是否可以正常连接,正常使用。
文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。
转载请注明本文地址:https://www.ucloud.cn/yun/129947.html
摘要:作者谭峰张文升出版日期年月页数页定价元本书特色中国开源软件推进联盟分会特聘专家撰写,国内多位开源数据库专家鼎力推荐。张文升中国开源软件推进联盟分会核心成员之一。 很高兴《PostgreSQL实战》一书终于出版,本书大体上系统总结了笔者 PostgreSQL DBA 职业生涯的经验总结,本书的另一位作者张文升拥有丰富的PostgreSQL运维经验,目前就职于探探科技任首席PostgreS...
摘要:添加的新功能也是让人咋舌强烈推荐所有使用的用户升级到,刚出就强烈推荐,厉害了看样子已经被无情抛弃了,不管什么原因,肯定是趋势了,毕竟已经有了预览版了。关于的新特性可以看往期文章,后面我们会陆续推出的更多新特性实战。 showImg(https://segmentfault.com/img/remote/1460000015352808); 前几天写了一篇 Java 8 即将在 2019...
摘要:问题九库控制文件扩展报错库的扩展报错,用的是裸设备,和还是原来大小,主库的没有报错,并且大小没有变,求解释。专家解答从报错可以看出,控制文件从个块扩展到个块时报错,而裸设备最大只支持个块,无法扩展,可以尝试将参数改小,避免控制文件报错。 链接描述引言 近期我们在DBASK小程序新关联了运维之美、高端存储知识、一森咖记、运维咖啡吧等数据领域的公众号,欢迎大家阅读分享。 问答集萃 接下来,...
阅读 1611·2023-01-11 13:20
阅读 2062·2023-01-11 13:20
阅读 1405·2023-01-11 13:20
阅读 2138·2023-01-11 13:20
阅读 4404·2023-01-11 13:20
阅读 3140·2023-01-11 13:20
阅读 1686·2023-01-11 13:20
阅读 4036·2023-01-11 13:20