




已阅读5页,还剩68页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Linux 平台 Oracle 单实例 从10.2.0.1 升级到10.2.0.5.4 步骤 电脑资料 这篇文档只是一个升级的步骤,不是一个完整的方案,对于完整的方案还需要更多的前期准备工作和善后工作,如备份和升级后的检查等, 10.2.0.5的Patch No是:8202632 10.2.0.5.4的Patch NO 是:12419392 10.2.0.5.4 的Patch 比较小,下载说明参考: Oracle10.2.0.5.4 Patch Set Update (PSU) Patch No: p12419392 blog.csdn./tianlesoftware/article/details/6797083 10.2.0.5 的PSU 有1G多,这个自己从Metalink上下载去了。 单实例下的升级步骤比较简单: 1. 备份整个ORACLE_HOME目录,Instance 2. 升级ORACLE 软件到10.2.0.5 3. 升级实例到10.2.0.5.4 4. 打10.2.0.5.4 的Patch 5. 检查无效对象 Oracle 10g upgrade from10.2.0.1 to 10.2.0.4 blog.csdn./tianlesoftware/article/details/5507762 Linux 下查看系统是32位 还是64 位的方法 blog.csdn./tianlesoftware/article/details/6267115 查看 Oracle 是32位还是64位的方法 blog.csdn./tianlesoftware/article/details/6818709 rootdave /# getconf LONG_BIT 32 rootdave /# uname -a Linux dave 2.6.18-164.el5xen #1 SMP Tue Aug18 16:06:30 EDT xx i686 i686 i386 GNU/Linux dave:/home/oracle sqlplus / as sysdba; SQL*Plus: Release 10.2.0.1.0 - Productionon Sun Oct 9 14:26:17 xx Copyright (c) 1982, xx, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise EditionRelease 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Miningoptions SQL select name from v$database; NAME - ANQING SQL select * from v$version; BANNER - Oracle Database 10g Enterprise EditionRelease 10.2.0.1.0 - Prod PL/SQL Release 10.2.0.1.0 - Production CORE 10.2.0.1.0 Production TNS for Linux: Version 10.2.0.1.0 -Production NLSRTL Version 10.2.0.1.0 - Production SQL rootdave mnt# su - oracle dave:/home/oraclelsnrctl stop LSNRCTL for Linux: Version 10.2.0.1.0 -Production on 09-OCT-xx 15:26:50 Copyright (c) 1991, xx, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1) The mand pleted suessfully dave:/home/oracleemctl stop dbconsole TZ set to PRC Oracle Enterprise Manager 10g DatabaseControl Release 10.2.0.1.0 Copyright (c) 1996, xx OracleCorporation. All rights reserved. dave:1158/em/console/aboutApplication Stopping Oracle Enterprise Manager 10gDatabase Control . . Stopped. dave:/home/oracle sqlplus / as sysdba; SQL*Plus: Release 10.2.0.1.0 - Productionon Sun Oct 9 15:27:00 xx Copyright (c) 1982, xx, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise EditionRelease 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Miningoptions SQLshutdown immediate Database closed. Database dismounted. ORACLE instance shut down. 注意: (1)我这里是测试环境,就不进行备份操作,如果是生产环境,切记在关闭实例后对ORACLE_HOME和 Instance 进行备份,然后在升级。 (2)运行Patch 必须关闭所有的相关进程,包括sqlplus客户端连接。不然会报错,安装无法继续。 2.2 运行Patch 进入Patch: 8202632,运行runInstaller 就ok了,patch里面有一个readme文档,里面有详细的说明。 选择我们需要升级的ORACLE_HOME 这里不写email 地址,这是个收费的metalink 帐号,如果有购买产品,可以写。 没购买,直接跳过。 验证相关的信息,如果有报错,根据提示修改一下相关参数就ok了。我这里修改了/etc/sysctl.conf文件下的三个参数: .ipv4.ip_local_port_range = 9000 65500 fs.file-max = 101365 .core.rmem_default = 1048576 修改完执行: rootdave mnt# sysctl p 使修改的参数生效,然后重新检测。全部通过后如下: 用root 用户运行脚本:/u01/app/oracle/product/10.2.0/db_1/root.sh。 运行结束后升级操作结束。 整个过程十几分钟搞定。 这里有2种方法,一是手工执行命令,而是使用dbua。 Dbua 工具是把相关的命令封装了起来,操作起来相对简单。 After youinstall the patch set, you must perform. the following steps on every databaseassociated with the upgraded Oracle home: Note: If you do not runthe catupgrd.sql script. as described in this section and you start upa database for normal operation, then ORA-01092: ORACLE instanceterminated. Disconnection forced errors will our and theerror ORA-39700: database must be opened with UPGRADE option will bein the alert log. 1. Log in as the Oracle softwareowner user. 2. For Oracle RAC installations,start listener on each node of the cluster as follows: $ srvctl start listener -n node 3. If you are using AutomaticStorage Management, start the Automatic Storage Management instance. 4. For single-instanceinstallations, start the listener as follows: $ lsnrctl start 5. For single-instance installations, use SQL*Plusto log in to the database as theSYSuserwithSYSDBAprivileges: $ sqlplus /nolog SQL CONNECT SYS AS SYSDBA Enter password:SYS_password Users of single-instance implementations should now bypass stepsthat apply to Oracle RAC installations. 6. For Oracle RAC installations: a. Use SQL*Plus to log in to the database as theSYSuserwithSYSDBAprivileges: $ sqlplus /nolog SQL CONNECT SYS AS SYSDBA Enter password: SYS_password SQL STARTUP NOMOUNT b. Set theCLUSTER_DATABASEinitializationparameter toFALSE: SQL ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=spfile; c. Shut down the database: SQL SHUTDOWN 7. Enter the following SQL*Plus mands: SQL STARTUP UPGRADE SQL SPOOL patch.log SQL ?/rdbms/admin/catupgrd.sql SQL SPOOL OFF 8. Review thepatch.logfile forerrors and inspect the list of ponents that is displayed at the end ofcatupgrd.sqlscript. This list provides the version and status of eachSERVERponentin the database. 9. If necessary, rerun thecatupgrd.sqlscriptafter correcting any problems. 10. Restart the database: SQL SHUTDOWN IMMEDIATE SQL STARTUP 11. Run theutlrp.sqlscriptto repile all invalid PL/SQL packages now instead of when the packages areaessed for the first time. This step is optional but remended. SQL ?/rdbms/admin/utlrp.sql Note: When the10.2.0.5 patch set is applied to an Oracle10g Standard Edition database,there may be 54 invalid objects after the utlrp.sql script. runs.These objects belong to the unsupported ponents and do not affect thedatabase operation. Ignore any messagesindicating that the database contains invalid recycle bin objects similar tothe following: BIN$4lzljWIt9gfgMFeM2hVSoA=$0 This issue is tracked with Oracle bug 9386364. 12. Run the following mand to check the status of all the ponentsafter the upgrade: SQL SELECTP_NAME, VERSION, STATUS FROM SYS.DBA_REGISTRY; In the output of the preceding mand, thestatus of all the ponents should beVALIDfor asuessful upgrade. 13. If you are using the Oracle Recovery Manager catalog, enter thefollowing mand: $ rman catalog username/passwordalias RMAN UPGRADE CATALOG; 14. For Oracle RAC installations: a. Set theCLUSTER_DATABASEinitializationparameter toTRUE: SQL ALTER SYSTEM SET CLUSTER_DATABASE=TRUE SCOPE=spfile; b. Restart the database: SQL SHUTDOWN IMMEDIATE SQL STARTUP c. Start any database services that you want to use: $ srvctl start service -d db_name -s service_name 15. To configure and secure Enterprise Manager follow these steps: Ensure the database and Listener are operational. (1)In the case of a single instance, execute emca -upgrade db (2)In the case of Oracle RAC, execute emca -upgrade db -cluster 我这里使用DBUA 工具来升级Instance。用Oracle 用户运行dbua命令。 这里我们并没有启动实例,dbua命令会自动完成这些操作。 这个过程比较漫长,需要近一个小时。倒数第二步EM配置出错。 这里我们先继续。EM 可以最后在单独配置。 dave:/home/oracle sqlplus / as sysdba; SQL*Plus: Release 10.2.0.5.0 - Productionon Sun Oct 9 17:02:12 xx Copyright (c) 1982, xx, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise EditionRelease 10.2.0.5.0 - Production With the Partitioning, OLAP, Data Miningand Real Application Testing options SQL col p_name format a40 SQL col version for a20 SQLSELECT P_NAME, VERSION, STATUSFROM SYS.DBA_REGISTRY; P_NAME VERSION STATUS - - Oracle Database Catalog Views 10.2.0.5.0 VALID Oracle Database Packages and Types 10.2.0.5.0 VALID Oracle Workspace Manager 10.2.0.5.0 VALID JServer JAVA Virtual Machine 10.2.0.5.0 VALID Oracle XDK 10.2.0.5.0 VALID Oracle Database Java Packages 10.2.0.5.0 VALID Oracle Expression Filter 10.2.0.5.0 VALID Oracle Data Mining 10.2.0.5.0 VALID Oracle Text 10.2.0.5.0 VALID Oracle XML Database 10.2.0.5.0 VALID Oracle Rule Manager 10.2.0.5.0 VALID P_NAME VERSION STATUS - - Oracle interMedia 10.2.0.5.0 VALID OLAP Analytic Workspace 10.2.0.5.0 VALID Oracle OLAP API 10.2.0.5.0 VALID OLAP Catalog 10.2.0.5.0 VALID Spatial 10.2.0.5.0 VALID Oracle Enterprise Manager 10.2.0.5.0 VALID 17 rows selected. 实例的版本已经升级到10.2.0.5.0了。 不过我们之前还有一个EM 的问题没有搞定。 Oracle OEM 的重建参考我的Blog: Oracle OEM 重建 及 案例 说明 blog.csdn./tianlesoftware/article/details/4702978 在Oracle10.2.0.4和10.2.0.5的版本里,OEM 有个bug,具体参考: Oracle 10.2.0.4和10.2.0.5中 OEM bug 8350262 blog.csdn./tianlesoftware/article/details/6568690 不过有的公司规定不启用OEM,那样这部都可以直接省略了。 EM的重建不影响instance 的使用,所以这个重建比较方便。 重建的步骤如下: (1)检查/etc/hosts 文件: dave:/home/oracle cat /etc/hosts # Do not remove the following line, orvarious programs # that require work functionality willfail. 127.0.0.1 dave localhost.localdomainlocalhost 192.168.3.2 dave (2) 启动监听: dave:/home/oracle lsnrctl start LSNRCTL for Linux: Version 10.2.0.5.0 -Production on 09-OCT-xx 17:01:10 Copyright (c) 1991, xx, Oracle. All rights reserved. Starting/u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait. TNSLSNR for Linux: Version 10.2.0.5.0 -Production System parameter file is/u01/app/oracle/product/10.2.0/db_1/work/admin/listener.ora Log messages written to/u01/app/oracle/product/10.2.0/db_1/work/log/listener.log Listening on:(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1) Listening on:(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dave)(PORT=1521) Connecting to(DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1) STATUS of the LISTENER - Alias LISTENER Version TNSLSNR for Linux: Version10.2.0.5.0 - Production Start Date 09-OCT-xx 17:01:11 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/10.2.0/db_1/work/admin/listener.ora Listener Log File /u01/app/oracle/product/10.2.0/db_1/work/log/listener.log Listening Endpoints Summary. (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dave)(PORT=1521) Services Summary. Service PLSExtProc has 1instance(s). Instance PLSExtProc, status UNKNOWN, has 1 handler(s) forthis service. The mand pleted suessfully (3)打EM的bug: 8350262 -安装patch dave:/mnt/OracleSoftware/10.2.0.4-5_OEM_Bug_p8350262/p8350262_10205_Generic/8350262$ORACLE_HOME/OPatch/opatch apply Invoking OPatch 10.2.0.4.9 Oracle Interim Patch Installer version10.2.0.4.9 Copyright (c) xx, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/10.2.0/db_1 Central Inventory :/u01/app/oracle/oraInventory from : /etc/oraInst.loc OPatch version : 10.2.0.4.9 OUI version : 10.2.0.5.0 OUI location : /u01/app/oracle/product/10.2.0/db_1/oui Log file location :/u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatchxx-10-09_18-35-54PM.log Patch history file:/u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt ApplySession applying interim patch8350262 to OH /u01/app/oracle/product/10.2.0/db_1 Running prerequisite checks. OPatch detected non-cluster Oracle Homefrom the inventory and will patch the local system only. Backing up files and inventory (not forauto-rollback) for the Oracle Home Backing up files affected by the patch8350262 for restore. This might take a while. Backing up files affected by the patch8350262 for rollback. This might take a while. Patching ponentoracle.sysman.agent.core, 10.2.0.5.0a. Updating jar file/u01/app/oracle/product/10.2.0/db_1/sysman/jlib/emd_java.jar with/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/util/SecConstants.class ApplySession adding interim patch 8350262to inventory Verifying the update. Inventory check OK: Patch ID 8350262 isregistered in Oracle Home inventory with proper meta-data. Files check OK: Files from Patch ID 8350262are present in Oracle Home. OPatch sueeded. (4)删除OEM的 dbconsole 和repository dave:/u01/app/oracle/product/10.2.0/db_1/binemca -deconfig dbcontrol db -repos drop STARTED EMCA at Oct 9, xx 5:33:12 PM EM Configuration Assistant, Version10.2.0.5.0 Production Copyright (c) xx, xx, Oracle. All rights reserved. Enter the following information: Database SID: anqing Listener port number: 1521 Password for SYS user: Password for SYSMAN user: - WARNING : While repository is dropped thedatabase will be put in quiesce mode. - Do you wish to continue? yes(Y)/no(N): y Oct 9, xx 5:33:35 PMoracle.sysman.emcp.EMConfig perform INFO: This operation is being logged at/u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/anqing/emca_xx-10-09_05-33-12-PM.log. Oct 9, xx 5:33:38 PMoracle.sysman.emcp.util.DBControlUtil stopOMS INFO: Stopping Database Control (this maytake a while) . Oct 9, xx 5:33:50 PM oracle.sysman.emcp.EMReposConfiginvoke INFO: Dropping the EM repository (this maytake a while) . Oct 9, xx 5:33:50 PMoracle.sysman.emcp.EMReposConfig dropRepository INFO: Dropping the EM repository (this maytake a while) . Oct 9, xx 5:35:14 PM oracle.sysman.emcp.EMReposConfiginvoke INFO: Repository suessfully dropped Enterprise Manager configuration pletedsuessfully FINISHED EMCA at Oct 9, xx 5:35:15 PM -执行用了3分钟 (5)重建EM的dbcontrol 和 repository dave:/u01/app/oracle/admin/anqing/bdumpemca -config dbcontrol db -repos create STARTED EMCA at Oct 9, xx 8:03:22 PM EM Configuration Assistant, Version10.2.0.5.0 Production Copyright (c) xx, xx, Oracle. All rights reserved. Enter the following information: Database SID: anqing Listener port number: 1521 Password for SYS user: Password for DBSNMP user: Password for SYSMAN user: Email address for notifications (optional): Outgoing Mail (SMTP) server fornotifications (optional): - You have specified the following settings Database ORACLE_HOME ./u01/app/oracle/product/10.2.0/db_1 Local hostname . dave Listener port number . 1521 Database SID . anqing Email address for notifications. Outgoing Mail (SMTP) server fornotifications . - Do you wish to continue? yes(Y)/no(N): y Oct 9, xx 8:03:40 PM oracle.sysman.emcp.EMConfigperform INFO: This operation is being logged at/u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/anqing/emca_xx-10-09_08-03-22-PM.log. Oct 9, xx 8:03:44 PMoracle.sysman.emcp.EMReposConfig createRepository INFO: Creating the EM repository (this maytake a while) . Oct 9, xx 8:06:32 PMoracle.sysman.emcp.EMReposConfig invoke INFO: Repository suessfully created Oct 9, xx 8:06:51 PMoracle.sysman.em
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年高校科技园孵化经理招聘笔试专项练习含答案
- 2025年村级儿童之家档案员招聘面试模拟题及答案
- 地下空间测绘合同
- 2025年军队文职人员统一招聘面试( 气象水文)预测题及答案
- 工程项目管理系统合同
- 2025年甘肃省庆阳市公务员省考公共基础知识模拟题(附答案)
- 六年级想象作文20年后我们再相聚700字13篇
- 2025年甘肃省嘉峪关市协警辅警笔试模拟题(附答案)
- 2025担保贷款合同范本模板
- 企业文化建设模板企业形象提升
- 公务用车政策解读课件
- 2025至2030年中国奶牛养殖行业竞争格局分析及投资战略咨询报告
- 光伏施工基本知识培训课件
- 创伤性血气胸的急救与护理
- 2025关于医疗平台与医疗机构合作合同模板
- 福州工会考试试题及答案
- 学校后勤工作管理培训
- 胰腺炎的营养治疗与护理
- 教师校园安全培训课件
- 头皮健康与头发生长关系的研究
- 财务结账相关管理制度
评论
0/150
提交评论