1.new ORACLE_HOME(11g), old ORACLE_HOME (10g)
2.install oracle software 11.2.0.2.0 on production
3.apply DB patch additional if needed
--patch详细信息参见 Note:16056267.8
11.2.0.2.10 (Apr 2013) Database Patch Set Update (PSU) Patch:
16056267 11g里面可能过期的参数,如user_dump......
11g里面新增加的参数,如diag....,有些需要考虑是否调优。
--系统级的调优也是必须的。需要找专门的team来提供意见。
6.PET and Production compare
7.confirm details with App team if have any concern.
--对于升级过程中的部分问题,如果不能确认,需要找开发或者其他的team来协调。
8.full backup or cold backup
--这个取决于具体的环境实施方案,保证充足的备份很重要,生产系统做cold backup应该很悬了。
9.check if there are crontab running or scheduled.
--这个需要提前考虑,一般的项目都会有系统监控,要保证在升级过程中排除不必要的影响。如果有goldengate同步之类的,也需要提前协调好,保证不会影响。
10.check if all database components are valid
select substr(comp_name,1,40) comp_name, status,
substr(version,1,10) version from dba_registry
order by comp_name; --组建都应该是valid状态。
11.check if all objects are valid
if there are component or objects invalid, need to use utlrp.sql
12.check if duplicate objects owned by SYS and SYSTEM Schema
--从dba_objects里查询,保证sys,system下的没有重复的object,,以下是期望的结果,如果有其他的,需要查看metalink文档来处理。Note,1030426.6
------------------------------ -------------------
AQ$_SCHEDULES_PRIMARY INDEX
DBMS_REPCAT_AUTH PACKAGE BODY
13.disable custom triggers
--为了排除trigger的导致的ddl影响,建议还是disable custom trigger.
14.Copy Pre-upgrade Information script. to a local folder
--建一个临时的文件夹,把升级所需的脚本拷贝过去。如脚本rdbms/admin/utlu112i.sql 需要从11ghome下rdbms/admin提前拷贝过去。
15.Run Pre-upgrade Information Tool on target database (10g)
spool pre_upgrade_info.log
16.Check the output of the Pre-Upgrade Information Tool
--这里需要注意warning信息,清空recyclebin,保证timezone file必须是v4,要不升级100%失败。还有要注意部分参数,根据提示进行修改。
17.backup /etc/oratab,tnsnames.ora,listener.ora sqlnet.ora,password file, pfile,spfile,profile
18.Copy Network files to 11g Home and modify the home in listener
--拷贝tnsnames.ora,listener.ora到11g home的对应目录下。
19.Copy password file to 11g Home
20.Prepare a separate .bash_profile to set 11g environment variables
21.Collect dictionary stats
EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;
22.Stop Listener services of the target database.
23.Shutdown the target database (10g)
--down掉数据库,清空缓存,这样起来以后跑脚本会排出很多干扰,速度也快一些。
24.Set working environment to 11g ORACLE_HOME. Make sure multiple ORACLE HOMEs are not in the PATH variable.
25.Copy spfile to 11g home.
26.stop source(10g) DB,Start the db in nomount,mount mode, and make necessary changes/adjustments in spfile with scope=spfile.
--这一步,需要修改compatible参数,调节一些参数。(之前的步骤进行参数调优的时候准备好的)
最后create spfile from pfile;
27.Shutdown and startup the db in upgrade mode.
28.Run upgrade script. Exit the session after upgrade.
--这个是最关键的脚本,运行时间也会长一些。,脚本运行完成后,会自动shutfdown immediate
@?/rdbms/admin/catupgrd.sql
29.Verify the log for errors. Ignore “table or view not found” errors
--如果有部分错误,需要检查,如果有些错误如memory issue 不能忽略,需要重新运行脚本
30.Startup the db in normal mode and run post upgrade information tool. Verify the status of each db component and address the failures.
spool post_upgrade_info.txt
@?/rdbms/admin/utlu112s.sql
31.Continue upgrade (new in 11g)
--继续执行脚本,属于post upgrade脚本。
@?/rdbms/admin/catuppst.sql
32.Recompile invalid objects
33.enable custom triggers
--enable之前disable的trigger
34.update /etc/oratab with 11g home
35.rename spfile/pfile from 10g home
--保证10g的参数不被使用,保证不会有错误的操作导致不必要的麻烦。
36.Start Listener services of the target database with 11g HOME.
37.DBA sanity check(check if mv is able to refresh,db components are valid,check if there are ORA erros from logs)
--DBA先做一些简单的sanity test.保证环境交给客户之前不会有基本的错误。
38.Check the connectivity from client
39.Backup of DB after upgrade
40.upgrade rman catalog if necessary
--如果使用rman做备份恢复,需要升级catalog
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23718752/viewspace-765999/,如需转载,请注明出处,否则将追究法律责任。