oracle 10g客户端连接11g,生产环境oracle10g升级至11g准备工作

主要有以下的步骤 :

1.new ORACLE_HOME(11g), old ORACLE_HOME (10g)

--这些需要提前提供给客户,作为基本的约定

2.install oracle software 11.2.0.2.0 on production

--总共有7个DB,时间很紧,所以准备要充分

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

4.init parameter tuning

--这个也是必需的,主要有三个方面

11g里面可能过期的参数,如user_dump......

11g里面新增加的参数,如diag....,有些需要考虑是否调优。

10g里面调优的隐含参数是否需要保留...

5.OS kernel tuning

--系统级的调优也是必须的。需要找专门的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

--可以使用如下的sql来

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

--检查object状态也应该是valid.

if there are component or objects invalid, need to use utlrp.sql

to recompile

12.check if duplicate objects owned by SYS and SYSTEM Schema

--从dba_objects里查询,保证sys,system下的没有重复的object,,以下是期望的结果,如果有其他的,需要查看metalink文档来处理。Note,1030426.6

OBJECT_NAME OBJECT_TYPE

------------------------------ -------------------

AQ$_SCHEDULES TABLE

AQ$_SCHEDULES_PRIMARY INDEX

DBMS_REPCAT_AUTH PACKAGE

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一下,做升级前的检查工作。

sqlplus / as sysdba

spool pre_upgrade_info.log

@utlu112i.sql

spool off

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

--备份必要的文件,作为rollback的备份。

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

--profile文件也需要做相应修改。

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.

--启动数据库,使用spfile,

--startup upgrade

28.Run upgrade script. Exit the session after upgrade.

--这个是最关键的脚本,运行时间也会长一些。,脚本运行完成后,会自动shutfdown immediate

spool upgrade11g2.log

@?/rdbms/admin/catupgrd.sql

Spool off

Exit

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

Spool

31.Continue upgrade (new in 11g)

--继续执行脚本,属于post upgrade脚本。

Spool upgrade11g2.log

@?/rdbms/admin/catuppst.sql

Spool off

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

41.change crontab

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值