Oracle 升级实战手册.docx

上传人:牧羊曲112 文档编号:4887039 上传时间:2023-05-21 格式:DOCX 页数:28 大小:2.15MB
返回 下载 相关 举报
Oracle 升级实战手册.docx_第1页
第1页 / 共28页
Oracle 升级实战手册.docx_第2页
第2页 / 共28页
Oracle 升级实战手册.docx_第3页
第3页 / 共28页
Oracle 升级实战手册.docx_第4页
第4页 / 共28页
Oracle 升级实战手册.docx_第5页
第5页 / 共28页
亲,该文档总共28页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

《Oracle 升级实战手册.docx》由会员分享,可在线阅读,更多相关《Oracle 升级实战手册.docx(28页珍藏版)》请在三一办公上搜索。

1、ORACLE升级实战手册一.准备环境数据库软件初始安装为10201版本oracleoracle T$ iduid=501(oracle) gid=501(oinstall) groups=501(oinstalljj 502(dba)j 503(oper)oracleoracle T$ hostname oracle, ezhou. coinorac 1 已orac 1 已 T$ sqlplus / as sysdbaSQL*Plus: Release 10. 2. 0. 1. 0 - Production on Wed Jun 29 16:27:50 2011Copyright (c) 19

2、82, 2005 Oracle. All rights res已tv已d.Connected t:Oracle Database 10g Ent erprise Edition Release 10.2.0.1.0 - Production With the Partitioningj OLAP and Data Mining optionsSQL select * from v$version;BANNEROracle Database 10g Ent er prise Edition Release 10. 2. 0. 1. 0 - ProdPL/SQL R己 1 已日m已 10. 2.

3、0. 1. 0 - ProductionCORE 10. 2. 0. 1. 0 ProductionTNS for Linux: Version 10. 2. 0. 1. 0 - ProductionNLSRTL Version 10. 2. 0. 1. 0 - ProductionSQL二. 升级ORACLE数据库1. ORACLE 10.2.0.1 升级至 ORACLE 10.2.0.2a. 准备升级介质升级使用了 Oracle PS (Patch Set) 10202,从 进行下载下载后上传到服务器,对补丁包进行解压缩racleSoracle u02$ 11total 622924drw

4、x 2oracleoinstall16384May2511:40lost+founddrwxr-xr-x 3oracleoinstall4096May2512:14aradata-rw-rr 1oracleoinstall637226927Feb1623:25p5337014_10202_LINUX-z86. zipracleSoracle u02$ unzip p5337014_10202_LINUX-x86.zipb. 关闭数据库和监听程序Eorac 1 已orac 1 已sqlplus / as sysdbaSQL*Plus: Release 10.2.0.1.0 - Productio

5、n on Wed Jun 29 16:33:37 2011Copyright (c) 1982, 2005, Orac 1 已. All rights r已m已rv已d.Conn已ct已d to:Orac1已 Dat abas已 10g Ent已rpris已 Edition R已1已am已 1。.Z. Q. 1.。 - ProductionWith the Partitioningj OLAP and Data Mining optionsSQL m已1已ct status from v$instanc已STATUSOPENSQL shutdotvn immediate;D at abas 已

6、 clos 已 d.Dat abas已 di smount 已d.ORACLE instance shut down.SQL Ips ef |grep ora_oracle554954830 16:34 pts/O00:00:00 /bin/bash-c ps -ef |grep ora_oracle555155490 16:34 pts/O00:00:00 grep ora_SQLoracleoracle lsnrctl stopc. 升级数据库软件执行runinstaller进行补丁集安装oracle(aoracle u02$ cd Diskl/ oracle(aoracle Diskl$

7、 II total 472-rw-r-r-1oracleinstall343141Feb25200610202 buglist .htiridrwxr-xr-x4oracleoinstall4096Feb&200&install-rw-r-r-1oracleinstall110645Feb252006patchnote.htmdrwxr-xr-x2oracleinstall4096Feb62006response-rwxr-xr-x1oracleinstall1430Feb62006runins tallerdrwxr-xr-x9oracleinstall4096Feb252006stageo

8、racle(aoracLe Diskl$ ./runlnstalLer开始安装界面Path覆盖原有的安装路径确认安装选项正常后,点击Install开始安装安装开始出现脚本执行提示使用root用户执行提示的脚本root(aoracl_e -# /uSl/app/oracle/product/lO.2/db _l/root.shi Running OraclelS root.sh script.The following environment variables are set as:ORA.CLE_OWNER= oracleORA.CLE_HOME= /uQl/app/oracle/produ

9、ct/ie.2/db 1Enter the full pathname of the local bin directory: /usr/local/bin:The file dbhome already exists in /usr/local/bin. Overwrite it? y/n n:The file oraenv already exists in /usr/local/bin. Overwrite it? y/n n:The file coraenv already exists in /usr/local/bin. Overwrite it? y/n n:Entries wi

10、ll be added to the /etc/oratab file as needed byDatabase Configuration Assistant when a database is created Finished running generic part of root.sh script.Now product-specific root actions will be performed.Successfully accumulated necessary OCR keys.Creating OCR keys for user root r privgrp root.O

11、peration successful.Configuration for Local CSS has been initializedStale CSS daemon is running. . . killing it nowAdding to inittabStartup will be queued to init within 90 seconds.Checking the status of new Oracle init process.Expecting the CRS daemons to be up within 600 seconds.CSS is active on t

12、hese nodes. oracleCSS is active on all nodes.Oracle CSS service is installed and running under init(IM) rootoracle -#数据库补丁 10202升级完成d.升级数据库数据字典执行dbua命令来对数据库进行升级,执行前可以对要升级的数据库进行冷备份口acleoracle -$ dbua选择 Upgrade a Database如果以前的数据是使用dbca创建,则可以选择以前的数据库ezhou如果以前的数据库是手工创建,则需要编辑/etc/oratab文件,手工添加数据库信息开始获得数据

13、库的信息选择Recompile invalid objects at the end of upgrade (升级结束后会编译失效的对象)并行度选择1选择I have already backed up my database (可以手工的对数据库进行冷备份,防止数 据库升级失败)确认升级选项,点击Finish开始升级数据库升级开始数据库升级完成,可以到提示的目录查看详细的升级日志确认最后的升级结果e.检查目标数据库升级后数据库已经打开,登陆后查看升级的版本检查是否有失效的对象oracleoracle T$ sqlplus / as sysdbaConnected to:Oracle Data

14、base 10g Enterprise Edition Release 10. 2. 0. 2. 0 - ProductionWith the Partitioningj OLAP and Data Mining optionsSQL select 率 fromversion;BANNEROracle Database 10g Enterprise Edition Release 10. 2. 0. 2. 0 - ProdPL/SQL Release 10. 2. 0. 2. 0 - ProductionCORE 10. 2. 0. 2. 0 ProductionTNS for Linux:

15、Version 10. 2. 0. 2. 0 - ProductionNLSRTL Version 10. 2. 0. 2. 0 - ProductionSQL select count (+) from dba_objects where status=JINVALID5 ;COUNT(*)2. ORACLE 10.2.0.2 升级至 ORACLE 10.2.0.4a. 准备升级介质升级使用了 Oracle PS(Patch Set)10204,从 进行下载下载后上传到服务器,对补丁包进行解压缩oracleoracle u02$ 11 total 1030208drwxr-xr-x 2rac

16、le oinstall4096Jun 2917:44archdrwx2racle oinstall16384May 2511:40lost+founddrwxr-xr-x 3racle oinstall4096May 2512:14aradata-rw-r一-r一 1racle oinstall1053748381Nov 212008p6810189_10204_Linuz-z86. zip-rw-r一-r一 1racle oinstall110645Feb 252006README, htmldrwxr-xr-x 2racle oinstall4096Jun 2918:07nnanoracl

17、eoracle u02$ unzip p6810189_10204_Linux-x86. zipb. 备份需要升级的数据库oracleoracle T$ rman target /Recovery Manager: Release 10. 2. 0. 2. 0 - Production on Wed Jun 29 17:50:54 2011Copyright (c) 1982, 2005, Oracle. All rights reserved.connected to target database: EZHOU (DBID=4038137002)郎AN show all;using tar

18、get database control file instead of recovery catalogRMAN configuration parameters are:CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # defaultCONFIGURE BACKUP OPTIMIZATION OFF; # defaultCONFIGURE DEFAULT DEVICE TYPE TO DISK; # defaultCONFIGURE CONTROLFILE AUTOBACKUP OFF; # defaultCONFIGURE CONTROLFILE

19、 AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ; # defaultCONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # defaultCONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # defaultCONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # defaultCONFIGURE MAXSETSIZE TO UNLIMI

20、TED; # defaultCONFIGURE ENCRYPTION FOR DATABASE OFF; # defaultCONFIGURE ENCRYPTION ALGORITHM AES*胃;# defaultCONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # defaultCONFIGURE SNAPSHOT CONTROLFILE NAME TO J/u01/app/oracle/product/10. 2/db_l/dbs/snapcf_ezhou. f5 ; # default郎AN CONFIGURE CONTROLFILE AUTO

21、BACKUP ON;new RMAN configuration parameters:CONFIGURE CONTROLFILE AUTOBACKUP ON;new RM AN configuration parameters are successfully storedRMAN CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO /uO2/rman/%FJ ;new RM AN configuration parameters:CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR

22、 DEVICE TYPE DISK TO /uO2/riran/%FJ ;new RMAN configuration parameters are successfully storedRMAN CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 2;new KMAN configuration parameters:CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 2;new RMAN conf

23、iguration parameters are successfully storedRMAN run 2 allocate channel dl type disk;3 allocate channel d2 type disk;4 backup database format J /u02/riDan/ezhoi-i_%i-i. bakJ ;5 release channel dl;6 release channel d2;7 c. 关闭数据库和监听程序RNAN shut down immediat已databas已 clos已d database dismountedOracle in

24、stance shut downRMAN exitRecovery Manager coinplete.oracleoracle T$ pm 一已f I grep ora_oracle 7644 14623 0 18:08 pts/O 00:00:00 grep ora_oracleorac 1 已 T$oracleoracle lsnrctl stopd. 备份数据库软件防止软件升级失败,通过tar命令对数据库软件目录进行打包备份racleoracle 10. 2 $ pwd/uOl/app/oracle/product/10. 2oracleoracle 10. 2 $ 11 total

25、4drwxr-x 56 oracle oinstall 4096 Jun 29 17:16 db_lracleSoracle 10. 2$ tar -zcvf db_l. tar. gz db_l/e. 升级数据库软件执行runinstaller进行10204补丁集的安装oracletaoracle $ cd /u02oraclecaoracle u02$ cd Diskl/ oracletaoracle Diskl$ ll total 1784-rw-r-r-1oracleinstafL1620786 Feb 22200810294_buglist.htmdrwxr-xr-x4oraclei

26、nstafL4096 Feb 172008install-rw-r-r-1oracleinstafL178465 Feb 232008patch note. Iitmdrwxr-xr-x2oracleinstafL4096 Feb 172008response-rwxr-xr-x1oracleinstafL1756 Feb 172008runlnstafLerdrwxr-xr-x10oracleinstaLL4096 Feb 222008stageroracleiaoracle Diskll$ ./runlnstaller开始安装界面确认Path覆盖原有的安装路径安装前预检查通过如果有检测到程

27、序运行,查看数据库,监听是否关闭 确认是否有ASM的环境在运行ErrorXOracle Univiersal Installer has detected that there are processes running in the currently selected Oracle Home. The following processes need to be shutdown before continuing:ocssd.binCficfc Hefp for more irtfoxmstion.Cficfc Retyy to try ngntn.Cfick Csncef to sto

28、p this( Help Retry Cancel如果有ASM环境运行,执行以下命令清理rootoracle T# /uOl/app/orac 1 已/product/10. 2/db_lAin/localconfig d已1 已t巳 Stopping CSSD.Shutting down CSS d位已mon.Shut down request successfully issued.Shut down has begun. The daemons should 已xit soon.rootoracle T#点击Retry继续安装确认安装选项安装开始如果检测到如下错误,提示说明em没有完全关

29、闭ErrorXError in writing to file/uOl/app/oracle/product/10.2/db_l/bin/emagent./uOl/app/oracle/product/10.2/db_l/bin/emagent (Text file bus0Click Hefp for more information.Cfick Retyy to try sguin.Cficfc Ignore to ignore this error and go on.Cficfc Csncef To s top 攻白 瞄 rsffnrion.Help Retry Ignore Canc

30、el J可以直接用kill命令关闭em的相关进程 rootoracle # ps -ef |grep emagent rout89S2 5127 0 1S:33 pts/1oracle14109 12376 0 17:19 pts/2routoracle T# kill -9 14109 r not oracle # ps -ef | grep eiriagent rout 8996 5127 0 18:33 pts/1 rnotoracle #00:00:0000:00:0400:00:00grep emagent/i_i01 /app/orac 1 e/produet/10. 2/db_l

31、/bin/emagentgrep emagent出现脚本执行提示使用root用户执行提示的脚本rootfaoracle -# /dQl/叩p/DEcle/prMuct/l。.W/曲.1/口。t.sK Running Oracl_el0 root.sh script.The following environment variables are set as:ORACLE_OWNER= oracle ORACLE_HOHE= /uQl/app/oracle/product/10.2/db_lEnter the full pathname of the local bin directory: T

32、he file dbhome already exists in /usr/lacal/bin. n:The file oraenv already exists in /usr/lacal/bin. n:The file coraenv already exists in /usr/locaWbin. n:/usr/lacal/bin:Overwrite it? (y/n)Overwrite it? (y/n)Overwrite it? fy/n)10204补丁集安装完成f.升级数据库数据字典升级数据库的数据字典到10204,执行dbua命令进行升级oracleoracle $ dbua选择

33、 Upgrade a Database选择需要升级的数据库开始获得数据库信息选择 Do Not Move Database Files as Part of Upgrade升级中不移动数据库文件Database Upgrade Assistant Step 3 of 8 : Move Database FHes一 口 xSpecify if you want to move the database files during the upgrade process. Do Not Move Database Files as Part of UpgradeL Move Database Fil

34、es during UpgradeSelect the storage mechanism you would like to use for the database. File SystemUse the File System for Database storage.Automatic Storage ManagementAutomatic Sturage Management simplifies database storage administration and optimizes d ar abase layout for I/O perfrirmance. To use t

35、his option, an ASM instance should exist on this host with configured disk groups, otherwise, please use DBCAto create an ASM instance and necessary disk groups on this host then re-st art the DELIACancel I Help ) select st at lie froiri 4inEt;jnce;ST 虹 USOPENSQL select ccuunt(、*,) frum dba_ubjecte

36、where Et;mtlie二INVALID.;COUNT *)SQL select 率 frniri v$ ver si nn;BANNEROracl e Database 10g Ent er prise Edi t i on Release 10. 2. 0. 4. 0 - ProdPL/SQL Release 10. 2. 0. 4. 0 - Prodi-ictionCOEE 10. 2. 0. 4. 0Product i onTNS fur Linux: Version 10. 2. 0. 4. 0 - Pro duct i onhLSRTL Version 10. 2. 0. 4. 0 - ProductionSQL

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号