Oracle 11g R2 升级方案

合集下载

oracle升级操作流程

oracle升级操作流程

数据库版本升级操作手册目录备份数据库 (3)升级Oracle软件 (3)修改ORACLE_HOME (12)升级实例 (13)手工使用脚本升级实例 (14)升级遇到问题的解决办法 (15)检查升级后的版本信息和无效对象 (16)附录 (17)本文用于指导oracle数据库由版本11。

2.0.1.0升级到版本11.2.0。

3.0升级步骤如下:➢备份数据库➢升级oracle 软件➢修改ORACLE_HOME➢升级实例➢检查升级后的版本信息和无效对象备份数据库由于oracle升级存在一定风险,所以在升级前一定要对已有数据进行备份。

1、停掉所有使用数据库的相关程序,以及数据库。

2、对数据库文件进行冷备份.备份后的文件可转存到异机或在本地存放。

升级Oracle软件1、获取oracle升级软件p1*******_112030_Linux—x86—64_1of7.zip 及p1*******_112030_Linux—x86—64_2of7.zip。

2、将其上传到数据库服务器的/tmp/目录下并解压.unzip p1*******_112030_Linux-x86-64_1of7。

zipunzip p1*******_112030_Linux—x86—64_1of7.zip3、解压后,会在当前目录下生成一个database目录.4、切换到oracle用户,执行oracle升级脚本。

5、s u - oracle/tmp/database/runInstaller6、不需要进行任何更改,直接点击下一步。

7、选择跳过软件更新,点击下一步。

8、选择升级现有数据库,点击下一步。

9、语言选择简体中文和英语,点击下一步。

10、选择企业版,并点击下一步。

11、Oracle基目录无需更改,软件位置需要更改为新的位置,这样可以减少宕机时间,是oracle所推荐的方法。

如下图我们将软件安装位置选择为/home/oracle/oracle11g3,修改后,点击下一步。

oracle11g升级

oracle11g升级
# zfs volsize=64G rpool/swap 增加swap设备大小
# swap -a /dev/zvol/dsk/rpool/swap 将增加大小的swap设备重新加入swap
2.1.5 安装solaris 11的桌面系统
ipadm set-ifprop -m ip -p standby=on net1
ipadm delete-ip net0
ipadm create-ip net0
ipadm create-ip net1
ipadm create-ipmp -i net0,net1 ipmp0
ipadm create-addr -T static -a local=10.84.252.226/27 ipmp0/v4
ipadm set-ifprop -m ip -p standby=on net1
2.1.7 设置RAC系统使用的心跳网卡
ipadm create-ip net2
ipadm create-addr –T static –a 100.100.100.100/24 net2/v4 (db1)
三个节点共同组成应用和容灾系统,两个节点在本地,另外一个节点放于远端数据中心,通过赛门铁克的SFHA软件构成比较高的冗余来完成数据的镜像。
1.2.升级前的EXP以及NBU的rman备份,因为操作系统本身需要升级,所以,在备份ORACLE数据库的数据后,需要彻底铲除OS本身,然后在系统上进行11g rac的部署。
100.100.100.101 db2-priv
100.100.100.102 db3-priv
另外一台主机的/etc/hosts文件里面需要这些地址,都写上。

ORACLE RAC 11Gr2 升级PSU 从11.2.0.3.0到11.2.0.3.8

ORACLE RAC 11Gr2 升级PSU 从11.2.0.3.0到11.2.0.3.8

11.2.0.3RAC 打PSU 11.2.0.3软件包PSU包p1*******_112030_Linux-x86-64.zip此包包含GI和DATABASE的PSU安装前准备1、opatch should be 11.2.0.3.4 or later.两个节点grid和oracle的版本都要最新[grid@rac1 OPatch]$ ./opatch versionOPatch Version: 11.2.0.3.122、生成ocm.rsp两个节点都要执行login as oracle$ORACLE_HOME/OPatch/ocm/bin/emocmrsp-no_banner -output /home/oracle/ocm.rsp3、Validation of Oracle Inventory$ $ORACLE_HOME/OPatch/opatch lsinventory -detail -oh <ORACLE_HOME>4、Stop EM Agent Processes Prior to Patching and Prior to Rolling Back the Patch$ $ORACLE_HOME/bin/emctl stop dbconsole安装1、自动安装login as root安装前注意ORACLE_HOME的所属组不可以为rootopatch auto <UNZIPPED_PATCH_LOCATION> -ocmrf <ocm response file>节点1:[root@rac1 OPatch]# /u01/app/grid/OPatch/opatch auto /opt/soft/11g/gi_psu_11.2.0.3.8 -ocmrf /home/oracle/ocm.rspCan't locate Switch.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /u01/app/grid/OPatch/crs/auto_patch.pl line 2734.BEGIN failed--compilation aborted at /u01/app/grid/OPatch/crs/auto_patch.pl line 2734.报错是因为少包,安装perl-Switch包perl-Switch-2.16-7.el7.noarch.rpm[root@rac1 ~]# /u01/app/grid/OPatch/opatch auto /opt/soft/11g/gi_psu_11.2.0.3.8 -ocmrf /home/oracle/ocm.rspExecuting /u01/app/grid/perl/bin/perl /u01/app/grid/OPatch/crs/patch11203.pl -patchdir/opt/soft/11g -patchn gi_psu_11.2.0.3.8 -ocmrf /home/oracle/ocm.rsp -paramfile /u01/app/grid/crs/install/crsconfig_paramsThis is the main log file: /u01/app/grid/cfgtoollogs/opatchauto2016-10-15_19-49-07.logThis file will show your detected configuration and all the steps that opatchauto attempted to do on your system:/u01/app/grid/cfgtoollogs/opatchauto2016-10-15_19-49-07.report.log2016-10-15 19:49:07: Starting Clusterware Patch SetupUsing configuration parameter file: /u01/app/grid/crs/install/crsconfig_paramsUnable to determine if /u01/app/oracle/product/11.2.0.3/db1 is shared oracle homeEnter 'yes' if this is not a shared home or if the prerequiste actions are performed to patch this shared home (yes/no):yesUnable to determine if /u01/app/grid is shared oracle homeEnter 'yes' if this is not a shared home or if the prerequiste actions are performed to patch this shared home (yes/no):yesStopping RAC /u01/app/oracle/product/11.2.0.3/db1 ...Stopped RAC /u01/app/oracle/product/11.2.0.3/db1 successfullypatch /opt/soft/11g/gi_psu_11.2.0.3.8/17076717/custom/server/17076717 apply successful for home /u01/app/oracle/product/11.2.0.3/db1patch /opt/soft/11g/gi_psu_11.2.0.3.8/16902043 apply successful for home /u01/app/oracle/product/11.2.0.3/db1Stopping CRS...Stopped CRS successfullypatch /opt/soft/11g/gi_psu_11.2.0.3.8/17076717 apply successful for home /u01/app/grid patch /opt/soft/11g/gi_psu_11.2.0.3.8/16902043 apply successful for home /u01/app/gridStarting CRS...CRS-4123: Oracle High Availability Services has been started.Starting RAC /u01/app/oracle/product/11.2.0.3/db1 ...Started RAC /u01/app/oracle/product/11.2.0.3/db1 successfullyopatch auto succeeded.节点2:[root@rac2 ~]# /u01/app/grid/OPatch/opatch auto /opt/soft/11g/gi_psu_11.2.0.3.8 -ocmrf /home/oracle/ocm.rspExecuting /u01/app/grid/perl/bin/perl /u01/app/grid/OPatch/crs/patch11203.pl -patchdir /opt/soft/11g -patchn gi_psu_11.2.0.3.8 -ocmrf /home/oracle/ocm.rsp -paramfile /u01/app/grid/crs/install/crsconfig_paramsThis is the main log file: /u01/app/grid/cfgtoollogs/opatchauto2016-10-15_20-54-32.logThis file will show your detected configuration and all the steps that opatchauto attempted to do on your system:/u01/app/grid/cfgtoollogs/opatchauto2016-10-15_20-54-32.report.log2016-10-15 20:54:32: Starting Clusterware Patch SetupUsing configuration parameter file: /u01/app/grid/crs/install/crsconfig_paramsUnable to determine if /u01/app/oracle/product/11.2.0.3/db1 is shared oracle homeEnter 'yes' if this is not a shared home or if the prerequiste actions are performed to patch this shared home (yes/no):yesUnable to determine if /u01/app/grid is shared oracle homeEnter 'yes' if this is not a shared home or if the prerequiste actions are performed to patch this shared home (yes/no):yesStopping RAC /u01/app/oracle/product/11.2.0.3/db1 ...Stopped RAC /u01/app/oracle/product/11.2.0.3/db1 successfullypatch /opt/soft/11g/gi_psu_11.2.0.3.8/17076717/custom/server/17076717 apply successful for home /u01/app/oracle/product/11.2.0.3/db1patch /opt/soft/11g/gi_psu_11.2.0.3.8/16902043 apply failed for home /u01/app/oracle/product/11.2.0.3/db1Stopping CRS...Stopped CRS successfullypatch /opt/soft/11g/gi_psu_11.2.0.3.8/17076717 apply successful for home /u01/app/grid patch /opt/soft/11g/gi_psu_11.2.0.3.8/16902043 apply failed for home /u01/app/gridStarting CRS...CRS-4123: Oracle High Availability Services has been started.Starting RAC /u01/app/oracle/product/11.2.0.3/db1 ...Started RAC /u01/app/oracle/product/11.2.0.3/db1 successfullyopatch auto succeeded.报错Missing command :fuserUtilSession failed:Prerequisite check "CheckSystemCommandAvailable" failed.Prerequisite check "CheckSystemCommandAvailable" failed.Prerequisite check "CheckSystemCommandAvailable" failed.Prerequisite check "CheckSystemCommandAvailable" failed.Prerequisite check "CheckSystemCommandAvailable" failed.Prerequisite check "CheckSystemCommandAvailable" failed.Prerequisite check "CheckSystemCommandAvailable" failed.Prerequisite check "CheckSystemCommandAvailable" failed.安装psmisc包[root@rac2 ~]# /u01/app/grid/OPatch/opatch auto /opt/soft/11g/gi_psu_11.2.0.3.8 -ocmrf /home/oracle/ocm.rspExecuting /u01/app/grid/perl/bin/perl /u01/app/grid/OPatch/crs/patch11203.pl -patchdir /opt/soft/11g -patchn gi_psu_11.2.0.3.8 -ocmrf /home/oracle/ocm.rsp -paramfile /u01/app/grid/crs/install/crsconfig_paramsThis is the main log file: /u01/app/grid/cfgtoollogs/opatchauto2016-10-15_21-55-47.logThis file will show your detected configuration and all the steps that opatchauto attempted to do on your system:/u01/app/grid/cfgtoollogs/opatchauto2016-10-15_21-55-47.report.log2016-10-15 21:55:47: Starting Clusterware Patch SetupUsing configuration parameter file: /u01/app/grid/crs/install/crsconfig_paramsUnable to determine if /u01/app/oracle/product/11.2.0.3/db1 is shared oracle homeEnter 'yes' if this is not a shared home or if the prerequiste actions are performed to patch this shared home (yes/no):yesUnable to determine if /u01/app/grid is shared oracle homeEnter 'yes' if this is not a shared home or if the prerequiste actions are performed to patch this shared home (yes/no):yesStopping RAC /u01/app/oracle/product/11.2.0.3/db1 ...Stopped RAC /u01/app/oracle/product/11.2.0.3/db1 successfullypatch /opt/soft/11g/gi_psu_11.2.0.3.8/17076717/custom/server/17076717 apply successful for home /u01/app/oracle/product/11.2.0.3/db1patch /opt/soft/11g/gi_psu_11.2.0.3.8/16902043 apply successful for home /u01/app/oracle/product/11.2.0.3/db1Stopping CRS...Stopped CRS successfullypatch /opt/soft/11g/gi_psu_11.2.0.3.8/17076717 apply successful for home /u01/app/grid patch /opt/soft/11g/gi_psu_11.2.0.3.8/16902043 apply successful for home /u01/app/gridStarting CRS...CRS-4123: Oracle High Availability Services has been started.Starting RAC /u01/app/oracle/product/11.2.0.3/db1 ...Started RAC /u01/app/oracle/product/11.2.0.3/db1 successfullyopatch auto succeeded.2、手动安装修改数据字典1、修改数据库字典cd $ORACLE_HOME/rdbms/adminsqlplus /nologSQL> CONNECT / AS SYSDBASQL> STARTUPSQL> @catbundle.sql psu applySQL> QUITSQL> select * from dba_registry_history;ACTION_TIMEACTION NAMESPACE VERSION ID--------------------------------------------------------------------------- ------------------------------ ------------------------------ ------------------------------ ----------BUNDLE_SERIES------------------------------COMMENTS--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------17-SEP-11 10.21.11.595816 AM APPLY SERVER 11.2.0.3 0PSUPatchset 11.2.0.2.015-OCT-16 01.36.13.936629 PM APPLY SERVER 11.2.0.3 0PSUPatchset 11.2.0.2.015-OCT-16 09.26.08.161876 PM APPLY SERVER 11.2.0.3 8PSUPSU 11.2.0.3.82、Upgrade Oracle Recovery Manager CatalogIf you are using the Oracle Recovery Manager, the catalog needs to be upgraded. Enter the following command to upgrade it:$ rman catalog username/password@aliasRMAN> UPGRADE CATALOG;回滚1、自动回滚login as root# opatch auto <UNZIPPED_PATCH_LOCATION> -rollback -ocmrf <ocm response file>。

oracle11gR2(oracle11.2)新特性

oracle11gR2(oracle11.2)新特性

oracle11gR2(oracle11.2)新特性by o8xv0123加强了升级包的安装功能1,直接从老版本升级到最新版,而不需要从老版本多次逐个执行小版本的升级比如,可以从11.0.1.0直接升级到11.0.3.0 或者从10.x直接升级到11.0.3.0而不需要先升级到11.0.2.0,再到11.0.3.02,可以将补丁包安装到新的独立的目录中,同时也支持用补丁覆盖安装到旧版oracle软件所在的目录,官方推荐前者3,新的软件安装包集成了安装程序和升级包,而不是先安装一个基础版本再打补丁包新的软件升级选项1,从oracle 11g r2开始,支持在线升级功能(动态地从oracle服务器下载,同时进行升级),也可以先将补丁包下载到本地,然后进行安装2,支持oracle客户端的覆盖安装升级3,TDE硬件设备加速功能(直译)新的oracl e网格架构安装选项Oracle Database 11g Release 2提供了新的oracle网格架构的安装,在单实例的数据库中,oracle的网格架构包括,ASM,listener和oracle restart(新特性),oracle restart将会监控oracle的运行并管理oracle的运行状况,如果一个包含了oracle数据库实例,oracle ASM管理实例和listener的oracle 环境出现故障,oracle restart将会自动对其进行重新启动。

在集群环境中,oracle网格架构包括,oracle 集群,oracle ASM和listeners。

如果想要在独立服务器中使用oracle 网格架构的话,必须要在安装oracle数据库之前安装oracle网格架构的相关软件。

新的桌面和服务器安装选项Oracle Database 11g Release 2提供了一个新的安装选项,你可以选择要安装数据库的系统的类型,如果是笔记本或者PC的话,可以选择"桌面类型“选项,否则可以选择服务器类型。

数据库11.2.0.3.12PSU升级方案

数据库11.2.0.3.12PSU升级方案

数据库11.2.0.3.12 PSU升级方案相关术语PSU (Patch Set Updates)PSU(补丁集更新)是累积型补丁--即某个特定的补丁集,它先前所有的PSU被包含于最近的PSU 中,例如:11.2.0.3.11的所有bug修复被包含于11.2.0.3.12中。

PSU包含推荐的bug修复,及最近的CPU,PSU每个季度发布一次。

具体方案1.介质下载1.1 GI PSU(INCLUDES DB PSU)介质My Oracle support网站搜索文档1922396.1可以得到数据库PSU补丁号码列表,Oracle 11g RAC 数据库它的PSU分GI部分和RDBMS部分。

通常GI的PSU介质会包含RDBMS的PSU介质--即DB 的PSU安装介质不必单独下载。

本次PSU升级是需要Linux 64平台的11.2.0.3.12 GI PSU介质,2014年第三季度发布的PSU。

补丁号:194403851.2 opatch 工具下载安装PSU,通常对opatch的最低版本有要求,如果opatch的版本不符合要求,则需要到My Oracle support去下载最新的opatch工具。

本次安装PSU 11.2.0.3.12需要opatch 11.2.0.3.5或者之后的版本。

查看opatch版本的方法:opatch version下载最新opatch工具的方法:My Oracle support 搜索补丁号:6880880得到最新的opatch工具下载链接。

2.opatch工具更新,oracle和grid用户的opatch都要更新,opatch位于$ORACLE_HOME目录下2.1 用tar命令备份现有的opatch目录2.2 删除现有的opatch目录2.3 将最新的opatch工具目录(补丁下载并解压获得)拷贝到上一步删除的目录的父目录下2.4 使用opatch version验证opatch的版本3.GI,RDBMS patching下列描述中<UNZIPPED_PATCH_LOCATION>是11.2.0.3.12 GI PSU的解压目录,<GI_HOME>是GI软件的安装目录,<ORACLE_HOME>是RDBMS的安装目录,11.2.0.3.12 GI PSU解压后形成的目录结构如下:BUG 19440385 - 11.2.0.3.12 (Oct 2014) Grid Infrastructure Patch Set Update (GI PSU) containsBUG 17592127- GRID INFRASTRUCTURE PATCH SET UPDATE 11.2.0.3.9(GI COMPONENTS) BUG 19121548- 11.2.0.3.12 (Apr 2014) Database Patch Set Update (PSU)In this example, the <GI_PSU_number> is 19440385; the <GI_Components_number> is 17592127; and the <DB_PSU_number> is 19121548.从上可知下载11.2.0.3.12介质并解压后,它包含两个子目录,一个是GI的PSU,另外一个是RDBMS的PSU建立一个目录,将zip文件移至这个目录下,然后unzip补丁文件,这个目录就是UNZIPPED_PATCH_LOCATION3.1停止EM代理进程oracle用户执行$ORACLE_HOME/bin/emctl stop dbconsole3.2root用户关闭crs,两个节点都要窒息crsctl stop crs3.3tar命令备份<ORACLE_HOME>,<GI_HOME>,两个节点都要执行3.4root用户解锁GI软件目录,两个节点都要执行# <GI_HOME>/crs/install/rootcrs.pl –unlock3.5生成ocm.rsp文件,2个节点均需执行,使用root用户执行$ORACLE_HOME/OPatch/ocm/bin/emocmrsp -no_banner -output $ORACLE_HOME/OPatch/ocm.rsp 安装psu补丁#$ ORACLE_HOME/OPatch/opatch auto <UNZIPPED_PATCH_LOCATION> -ocmrf$ORACLE_HOME/OPatch/ocm.rsp3.6Run catbundle.sql,升级数据库数据字典,只在一个节点上执行即可。

Oracle10g升级到11g

Oracle10g升级到11g

数据库移植1:Oracle10g升级到11g一:安装11gR2的数据库软件1:先给oracle11g制定一个主目录($ORACLE_HOME),写入到vim /home/oracle/.bash_profile 中,创建原本不存在的文件夹(我这里定义了一个新的db_2作为oracle11g的主目录)下面注释的这一行是为了引起注意,实际上是不可以注释的2:mkdir /home/oradisk1 在这个文件夹下面解压oracle11g的软件,注意要给这个文件夹赋予相应的权限Chown -R oracle:oinstall /home/oradisk1Chmod -R 775 /oradisk13:$cd /home/oradisk1/database/$./runInstaller开始安装这一步骤可以跳过,否则会出现错误这里仅仅需要安装数据库软件就可以了,不需要创建数据库实例注意此时的安装路径是/u01/app/oracle/product/10.2.0/db_2 (oracle11g的路径)在这里,会通过一系列的检查出先一些错误,会显示失败。

用鼠标点击错误在下面的提示框内会出现预期的值和实际出现的值,可根据提示进行修改,有些也可以忽略(点击右上角的全部忽略)修改后重新装安装完成二:进行安装前的初步检查1:此时需要启动oracle10的数据库实例,所以要先通过导入oracle10的主目录,将换将变量中的oracle11的主目录注释后重启生效,否则无法开启oracle10的数据库实例export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_12:在升级之前确保所有的组件和对象都是vaild的SQL>select substr(comp_name,1,40) comp_name, status, substr(version,1,10) version from dba_registry order by comp_name; --针对组件SQL>select substr(object_name,1,40) object_name,substr(owner,1,15) owner,object_type from dba_objects where status='INV ALID' order by owner,object_type; --针对对象如果有invalid的对象,运行utlrp.sql重新编译对象。

oracle11g数据库升级数据库升级

oracle11g数据库升级数据库升级

oracle11g数据库升级数据库升级Oracle对⾃⼰产品也⼀样,对于⾃⼰的产品在不同的时期,⽀持的强度是不⼀样的。

⼤体分来,⽀持的强度分为三个级别:Premier Support(最⾼优先级的⽀持),Extended Support(中等优先级的⽀持),Sustaining Support(最低优先级的⽀持)1.从产品发布为期5年的标准⽀持服务期-Premier support2.随后为期3年的延展⽀持服务期---------extended support3.接下来进⼊持久⽀持服务期--------------sustaining support不过根据不同的周期划分,Oracle的⽀持费⽤将会不同,在延展服务器内,第⼀年将会加收10%的费⽤提供⽀持,第⼆年加收20%的费⽤提供⽀持,第三年也是加收20%的费⽤提供⽀持。

Oracle11g的推出,oracle的升级成为必然。

升级包括软件的升级和数据库的升级两部分。

升级路线图wKiom1RwrmjSXODJAAITOSDSG4c601.jpg⼤概的升级步骤:(1)备份数据库(2)运⾏patchset,升级oracle 软件(3)准备新的ORACLE_HOME(4)运⾏dbua 或者脚本升级实例(5)检查升级后的版本信息和⽆效对象升级补丁包选择Metalink⽂档id:1922396.1会更新需要的补丁号wKioL1RwrxricNIJAAOWwmqw9J4760.jpg升级⽅法选择关于⽅法有很多,每种有各⾃的特点,根据特点选择合适的升级⽅式。

wKiom1RwrtewdeArAAQ_nAkHjZs922.jpgwKioL1Rwr5nSrTalAAJMXvvLJe0792.jpg可以选择参考⽂档id 1674333.1和1602485.1分别是9i和11g升级到最新的11gR2wKiom1Rwr2fB0BrVAASB_rjEEMs949.jpg第 1 步======下载 11.2.0.2 或更⾼版本的 RDBMS 软件。

11GRAC11.2.0.1升级11.2.0.3

11GRAC11.2.0.1升级11.2.0.3

11GRAC11.2.0.1升级11.2.0.311G RAC 双节点11.2.0.1升级到11.2.0.3目录一、GI 升级 (1)1. 升级前准备 (1)2. 常见问题及解决办法 (1)a. 问题1: (1)b. 问题2: (1)c. 问题3: (3)d. 问题4: (3)3. GI升级过程及详细图解 (3)4. GI升级后验证 (12)二、升级rdbms (12)1. 升级oracle software (12)2. Oracle database升级 (20)3. rdbms升级后验证 (25)4. 升级结束 (26)一、GI 升级1.升级前准备需要软件p1*******_112030_Linux-x86-64_3of7.zip解压[grid@test01 temp]$ unzip p1*******_112030_Linux-x86-64_3of7.zip[grid@test01 temp]$ cd grid/[grid@test01 grid]$ pwd/temp/grid/[grid@test01 grid]$ ./runcluvfy.shstage -pre crsinst -upgrade-n test01,test02-rolling -src_crshome $ORACLE_HOME -dest_crshome $ORACLE_HOME -dest_version 11.2.0.3.0 -fixup -fixupdir /tmp -verbose2.常见问题及解决办法a.问题1:/u01/app/11.2.0/grid test01 /u01 3.8643GB 5.5GB failed 解决方法:整理磁盘b.问题2:Checking for Oracle patch "9413827" in home "/u01/app/grid/11.2".Node Name Applied Required Comment--------------------------------------------------------------------------------------------------------------------------------- test02 missing 9413827 failedtest01 missing 9413827 failed解决方法:打补丁9413827如果集群的管理用户和数据库管理用户是在同一个用户下,那么需要改变一下环境变量,使用命令. oraenv授权(双节点)[root@test01 ~]# chown -R grid:oinstall /u01/app/grid/11.2/ 备份一下(双节点)[grid@test01 ~]$cp -rf $ORACLE_HOME/OPatch $ORACLE_HOME/OPatch_bk解压(双节点)[grid@test01 tmp]$ unzip p9413827_112010_Linux-x86-64.zip -d $ORACLE_HOME看一下版本(双节点)[grid@test01 11.2]$ $ORACLE_HOME/OPatch/opatch versionOPatch Version: 11.2.0.3.0OPatch succeeded.集群1节点操作[***************]$srvctlstophome-o$ORACLE_HOME-s /tmp/dex -n test01解锁[root@test01 ~]# /u01/app/grid/11.2/crs/install/rootcrs.pl -unlockSuccessfully unlock /u01/app/grid/11.2备份[grid@test01~]$ /u01/app/grid/11.2/9413827/custom/scripts/prepatch.sh -dbhome $ORACLE_HOME/u01/app/grid/11.2/9413827/custom/scripts/prepatch.sh completed successfully.打补丁[grid@test01 ~]$ cd /u01/app/grid/11.2/9413827/[grid@test01 9413827]$ /u01/app/grid/11.2/OPatch/opatch napply -local -oh $ORACLE_HOME -id 9413827[grid@test019413827]$ custom/server/9413827/custom/scripts/postpatch.sh -dbhome $ORACLE_HOME[root@test01 ~]# /u01/app/grid/11.2/crs/install/rootcrs.pl -patch-----------------------------------------------------------------------------------2012-05-28 14:59:52: Parsing the host name2012-05-28 14:59:52: Checking for super user privileges2012-05-28 14:59:52: User has super user privilegesUsing configuration parameter file:crs/install/crsconfig_paramsCRS-4123: Oracle High Availability Services has been started.查看下状态[grid@test01 OPatch]$ ./opatch lsinventory[grid@test01 ~]$ crsctl stat res -t------------------------------------------------------------------------------------------------------------ora.prod.db1 ONLINE ONLINE test01 Open2 ONLINE ONLINE test02 Open-------------------------------------------------------------------------------------------------------------如果出现如下这种状况,升级另外一个节点,步骤同节点1-------------------------------------------------------------------------------------------------------------ora.prod.db1 ONLINE ONLINE test01 Open2 ONLINE ONLINE test02--------------------------------------------------------------------------------------------------------------至此为止,补丁完成c.问题3:Check: Kernel parameter for "shmmni"Node Name Current Configured Required Status Comment ---------------------------------------------------------------------------------------------------------test02 4096 unknown 4096 failed Configured value too low.test01 4096 unknown 4096 failed Configured value too low.解决方法:[root@test01 ~]# /tmp/CVU_11.2.0.3.0_grid/runfixup.shResponse file being used is :/tmp/CVU_11.2.0.3.0_grid/fixup.responseEnable file being used is :/tmp/CVU_11.2.0.3.0_grid/fixup.enableLog file location: /tmp/CVU_11.2.0.3.0_grid/orarun.logSetting Kernel Parameters...The value for shmmni in response file is not greater than value of shmmni for current session. Hencenot changing it.d.问题4:Checking all nodes to make sure that search entry is " " as found on node "test02"All nodes of the cluster have same value for 'search'Checking DNS response time for an unreachable nodeNode Name Status---------------------------------------------------------------------------test02 failedtest01 failed解决方法:在dns服务器中加入缺少的域或者将/etc/resolv.conf中多余的查找域删除再次验证[grid@test01 grid]$./runcluvfy.shstage -pre crsinst -upgrade -n test01,test02-rolling -src_crshome $ORACLE_HOME -dest_crshome $ORACLE_HOME -dest_version 11.2.0.3.0 -fixup -fixupdir /tmp -verbose待所有问题解决后,开始升级安装3.GI升级过程及详细图解unset ORACLE_HOMEunset ORACLE_BASEunset ORACLE_SID ./runInstaller节点1执行脚本如下图:[root@test01 ~]# /u01/app/11.2.0/grid/rootupgrade.sh节点2执行脚本如下图:[root@test02 ~]# /u01/app/11.2.0/grid/rootupgrade.sh最后一步报错可忽略,点Skip跳过。

SAP Oracle 11g升级文档(整理版)

SAP Oracle 11g升级文档(整理版)

SAP Oracle 11g升级文档1.操作系统检查 (2)1.1检查操作系统版本 (2)1.2检查安装包 (2)1.3检查C++运行环境 (2)1.4其他操作系统检查 (2)1.5检查当前数据库版本 (3)2.安装前准备 (3)2.1 用户,组等权限检查 (3)2.2 创建目录并解压ORACLE介质 (3)2.3 更新安装脚本 (4)2.4 检查脚本 (4)3 安装Oracle软件 (5)3.1 设置环境变量,进行软件安装 (5)3.2 安装Opatch (15)3.3 更新Listener和tnsnames文件 (16)3.4 执行升级前脚本检查 (17)4.正式开始数据库升级 (18)4.1停止数据库 (18)4.2修改文件/etc/oratab (18)4.3启动DBUA进行升级 (19)5.升级后后续操作 (27)5.1 修改orabid用户环境变量 (27)5.2检查升级后的数据库 (28)5.3进行数据字典和系统表空间状态更新 (29)5.4数据参数修改 (29)5.5数据库状态更新 (31)5.6运行Post UPGRADE 脚本 (31)5.7创建数据共享包之间的连接 (31)5.8启动数据库Listener (31)5.9备份原有的oracle bin 目录 (32)5.10修改ORACLE_HOME目录给bidadm用户的权限 (32)5.11更新Oracle Client (32)5.12修改orabid以及bidadm用户下的Oracle client相关信息 (33)5.13更新JDBC驱动程序路径 (34)6.启动SAP系统 (39)1.操作系统检查1.1检查操作系统版本(Oracle 11g要求操作系统版本高于6100-02-05)执行命令: oslevel -s1.2检查安装包执行以下命令检查安装包:‘lslpp –l |grep bos.adt.base‘lslpp –l |grep bos.adt.lib‘lslpp –l |grep bos.adt.libm‘lslpp –l |grep bos.perf.libperfstat‘lslpp –l |grep bos.perf.perfstat‘lslpp –l |grep bos.perf.proctools1.3检查C++运行环境执行命令:’ lslpp –l |grep xlC.aix (版本要求大于等于: 10.1.0.0)1.4其他操作系统检查内存检查,需要大于1G,执行命令: lsattr –El mem0/tmp文件系统需要有大于1G空余空间,执行命令: df –g /tmp检查swap空间,执行命令: lsps –a ,要求交换页空间至少大于20GB 检查ORACLE_HOME,应该有剩余15G空间,命令: df –g /oracle/BID1.5检查当前数据库版本执行语句: ‘select version from v$instance;2.安装前准备2.1 用户,组等权限检查检查写入权限,执行以下语句:‘cd $ORACLE_BASE‘touch $ORACLE_HOME/write_test‘rm $ORACLE_HOME/write_test设置umask2.2 创建目录并解压ORACLE介质创建目录解压目录: mkdir /oracle/stage/11202检查/oracle/stage空间,执行df –g /oracle/stage ,要求空间至少有10GB的空余空间扩充空间,执行命令: chfs –a size=+6G /oracle/stage解压Oracle介质执行命令:’SAPCAR –xvf /setupcd/BW_OPT_CD/51040503_ORACLE_RDBMS11G202/OR111264.SAR ’SAPCAR –xvf /setupcd/BW_OPT_CD/51040503_ORACLE_RDBMS11G202/OR211264.SAR ’SAPCAR –xvf /setupcd/BW_OPT_CD/51040503_ORACLE_RDBMS11G202/OR311264.SAR ’SAPCAR –xvf /setupcd/BW_OPT_CD/51040503_ORACLE_RDBMS11G202/OR411264.SAR ’SAPCAR –xvf /setupcd/BW_OPT_CD/51040503_ORACLE_RDBMS11G202/OR511264.SAR检查Inventtory文件,执行命令cd /etc , more oraInst.loc2.3 更新安装脚本2.4 检查脚本使用root用户登陆,切换到目录:/oracle/stage/11202/database, 执行脚本rootpre.sh:使用orabid登陆,进行安装前检查,切换到目录cd /oracle/stage/11202/database,执行脚本./runInstaller -executeSysPrereqs设置DISPLAY环境变量,运行./RUNINSTALLER_CHECK3 安装Oracle软件3.1 设置环境变量,进行软件安装设置以下环境变量:unsetenv TWO_TASKunsetenv ORA_NLSunsetenv ORA_MLS32unsetenv ORA_NLS32unsetenv ORA_NLS33unsetenv ORA_NLS10umask 022setenv DISPLAY XX.XX.XX.XX:1.0setenv ORACLE_HOME_SRC /oracle/BWQ/112_64setenv ORACLE_HOME_TGT /oracle/BWQ/11203setenv LIBPATH $ORACLE_HOME/lib:$LIBPATHxclock备份文件切换到目录cd /oracle/stage/11202/database/SAP, 准备开始数据库软件安装:启动RUNINSTALLER进行安装cd /oracle/stage/11202/database/SAPxclock./RUNINSTALLER报错:检查日志:参照Note: 1431796 ,执行以下语句重新启动安装软件: ./RUNINSTALLER -nocheck 启动界面开始:保持默认,点击”Next”点击”Yes”保持默认,点击”Next”保持默认,点击”Next”保持默认,点击”Next”保持默认,点击”Next”保持默认,设置Software Location: /oracle/BID/11202,点击”Next”保持默认,点击”Next”保持默认,点击”Install”查看安装进度重新打开窗口以root用户登陆执行脚本:点击Close退出3.2 安装Opatch更新opatch脚本:注意设置环境变量: setenv ORACLE_HOME /oracle/BWQ/11203 -----------省略以下步骤:------检查包安装先决条件--------------------省略-------------------------以root用户登陆,执行slibclean使用用户orabid登陆,切换到目录: /oracle/BID/11202/MOPatch执行以下命令: /oracle/BID/11202/MOPatch/mopatch.sh -v -s /setupcd/BW_OPT_CD/SAP_112023_201108_AIX.zip查看命令执行结果,到目录:/oracle/BID/11202/cfgtoollogs/mopatch 查看日志文件3.3 更新Listener和tnsnames文件拷贝admin下的文件到新目录:‘cd /oracle/BID/102_64/network/admin‘cp –rp * /oracle/BID/11202/network/admin修改listener.ora中的ORACLE_HOME添加语句ADR_BASE_LISTENER = /oracle/BWD/saptrace3.4 执行升级前脚本检查切换到用户orabid, 切换到目录:cd /setupcd/BW_OPT_CD/SAP_112023_201108/9584028/files/sap/ora_upgrade/pre_upgrade运行脚本: @pre_upgrade_status.sql,脚本路径:/setupcd/BW_OPT_CD/SAP_112023_201108/9584028/files/sap/ora_upgrade/pre_upgrade执行脚本pre_upgrade_tasks.sql执行: @/setupcd/BW_OPT_CD/SAP_112023_201108/9584028/files/sap/ora_upgrade/pre_upgrade/pre _upgrade_tasks.sql4.正式开始数据库升级4.1停止数据库执行命令: shutdown immediate;停止listener, 执行命令:lsnrctl stop4.2修改文件/etc/oratab在文件中添加以下行:‘vi /etc/oratab‘BID:/oracle/BID/102_64:N4.3启动DBUA进行升级设置环境变量:‘setenv ORACLE_HOME_SRC /oracle/BWQ/112_64‘setenv ORACLE_HOME_TGT /oracle/BWQ/11203‘setenv DISPLAY XX.XX.XX.XX:1.0直接执行以下脚本:‘sh/setupcd/BW_OPT_CD/SAP_112023_201108/9584028/files/sap/ora_upgrade/post_upgra de/dbua.sap.sh点击”Next”点击”Next”点击”Next”点击”Next”取消勾选”Specify Fast Recovery Area”,点击”Next”取消勾选”Configure the database with Enterprise Manager”,点击”Next”确认信息,点击”Finish”开始进行数据库升级点击”OK”点击”Close”5.升级后后续操作5.1修改orabid用户环境变量切换到目录: /oracle/BID,执行命令:‘cp .dbenv_libbid.csh .dbenv_libbid.csh.10g‘cp .dbenv_libbid.sh .dbenv_libbid.sh.10g修改.dbenv_lgbbid.csh修改文件.dbenv_lgbbid.sh5.2检查升级后的数据库启动数据库,执行以下脚本:/setupcd/BW_OPT_CD/SAP_112023_201108/9584028/files/sap/ora_upgrade/post_u pgrade/post_upgrade_checks.sql重点关注以下输出信息:查看Compatible参数:5.3进行数据字典和系统表空间状态更新执行语句:‘brconnect –u / -c –f stats –t system_stats‘brconnect –u / -c –f stats –t oradict_stats 5.4数据参数修改参照Note 1431798alter system reset BACKGROUND_DUMP_DEST scope = spfile sid = '*';alter system reset OPTIMIZER_INDEX_CACHING scope = spfile sid = '*';alter system reset OPTIMIZER_INDEX_COST_ADJ scope = spfile sid = '*';alter system reset OPTIMIZER_MODE scope = spfile sid = '*';alter system reset USER_DUMP_DEST scope = spfile sid = '*'alter system reset COMMIT_LOGGING scope = spfile sid = '*';alter system reset COMMIT_WAIT scope = spfile sid = '*';alter system reset COMMIT_WRITE scope = spfile sid = '*';alter system reset NLS_LENGTH_SEMANTICS scope = spfile sid = '*';alter system reset NLS_LENGTH_SEMANTICS scope = spfile sid = '*';alter system reset DB_FILE_MULTIBLOCK_READ_COUNT scope = spfile sid = '*';alter system reset CORE_DUMP_DEST scope = spfile sid = '*';alter system set AUDIT_FILE_DEST='/oracle/BID/11202/saptrace/audit' scope = spfile;alter system set DB_BLOCK_SIZE =8192 scope = spfile;alter system set DIAGNOSTIC_DEST ='/oracle/BID/11202/saptrace' scope = spfile;alter system set DB_NAME ='BID' scope = spfile;alter system set FILESYSTEMIO_OPTIONS ='SETALL' scope = spfile;alter system set LOG_ARCHIVE_DEST_1='/oracle/BID/oraarch/BIDarch' scope = spfile;alter system set LOG_ARCHIVE_FORMAT ='%t_%s_%r.dbf' scope = spfile;alter system set LOG_CHECKPOINTS_TO_ALERT=true scope = spfile;alter system set MAX_DUMP_FILE_SIZE=20000 scope = spfile;alter system set OPEN_CURSORS=800 scope = spfile;alter system set OPTIMIZER_DYNAMIC_SAMPLING=6 scope = spfile;alter system set CONTROL_FILE_RECORD_KEEP_TIME=30 scope = spfile;alter system set PARALLEL_EXECUTION_MESSAGE_SIZE=16384 scope = spfile;alter system set PARALLEL_MAX_SERVERS=40 scope = spfile;alter system set PARALLEL_THREADS_PER_CPU=1 scope = spfile;alter system set PROCESSES = 300 scope = spfile;alter system set SESSIONS = 600 scope = spfile;alter system set QUERY_REWRITE_ENABLED=FALSE scope = spfile;alter system set RECYCLEBIN =OFF scope = spfile;alter system set REMOTE_OS_AUTHENT = TRUE scope = spfile;alter system set REPLICATION_DEPENDENCY_TRACKING=FALSE scope = spfile;alter system set STAR_TRANSFORMATION_ENABLED = TRUE scope = spfile;alter system set "_B_TREE_BITMAP_PLANS"=FALSE scope = spfile;alter system set "_FIRST_SPARE_PARAMETER"=1 scope = spfile;alter system set "_MUTEX_WAIT_TIME"=10 scope = spfile;alter system set "_MUTEX_WAIT_SCHEME"=1 scope = spfile;alter system set "_OPTIM_PEEK_USER_BINDS"=FALSE scope = spfile;alter system set "_OPTIMIZER_ADAPTIVE_CURSOR_SHARING"=FALSE scope = spfile;alter system set "_OPTIMIZER_EXTENDED_CURSOR_SHARING_REL"=NONE scope = spfile;alter system set "_OPTIMIZER_USE_FEEDBACK"=FALSE scope = spfile;5.5数据库状态更新‘brconnect –c –u / -f stats –t all –f collect –p 45.6运行Post UPGRADE 脚本执行以下脚本:/setupcd/BW_OPT_CD/SAP_112023_201108/9584028/files/sap/ora_upgrade/post_u pgrade/post_upgrade_status.sql5.7创建数据共享包之间的连接切换到用户orabid, 切换到目录: /oracle/BID/11202/lib,执行以下命令:‘cd /oracle/BID/11202/lib‘ln –s libnnz11.so libnnz10.so5.8启动数据库Listener执行命令: lsnrctl start5.9备份原有的oracle bin 目录‘cd /oracle/BID/102_64‘mv /oracle/BID/102_64/bin /oracle/BID/102_64/bin-old5.10修改ORACLE_HOME目录给bidadm用户的权限‘chmod 755 $ORACLE_HOME5.11更新Oracle Client创建Client存放目录,路径:’cd /oracle/client‘mkdir 11x_64切换到新建目录并接压文件‘cd /oracle/client/11x_64‘SAPCAR –xvf /setupcd/11GCLIENT/OCL_AIX_PPC64/OCL11264.SAR创建Link‘ln –s /oracle/client/11x_64/instantclient_11202 instantclient‘ls –alrt5.12修改orabid以及bidadm用户下的Oracle client相关信息升级完成oracle client以后,修改orabid环境变量,修改文件/oracle/BID .dbenv_lgbbid.sh, .dbenv_lgbbid.csh下的ORACLE_CLIENT路径修改bidadm用户的环境变量备份环境变量,切换到目录: /home/bidadm‘ cp .dbenv_ligbbid.sh .dbenv_lgbbid.sh.10g‘ cp .dbenv_ligbbid.csh .dbenv_lgbbid.csh.10g修改/home/bidadm 下的.dbenv_lgbbid.sh中的ORACLE_HOME 和ORACLE_CLIENT 修改/home/bidadm 下的.dbenv_lgbbid.sh同时修改bidadm用户/home/bidadm 下的文件: .dbenv_lgbbid.sh , .dbenv_lgbbid.csh下的ORACLE_CLIENT路径5.13更新JDBC驱动程序路径修改Configtool中的JDBC路径:修改config.properites中的rdbms.driverLocation路径启动configtool.sh点击” Switch to configuration editor mode”修改cluster_data/dispatcher/IDXXXX/kernel/propertysheet.ConfigurationManager 修改cluster_data/server/IDXXXX/kernel/propertysheet.ConfigurationManager登陆SAP GUI,执行事务码RZ10修改bootstrap.properties切换到目录: /usr/sap/BID/DVEBMGS00/j2ee/cluster/bootstrap 修改文件bootstrap.properties中的rdbms.driverLocation路径修改SDM中的路径切换到路径: /usr/sap/BID/DVEBMGS00/SDM/program/config 修改”Driver Paths”中的路径修改rdb中的oracle client路径切换到路径/usr/sap/BID/DVEBMGS00/j2ee/deploying修改rdbms.driverLocation路径修改temp中的oracle client路径切换到路径/usr/sap/BID/DVEBMGS00/j2ee修改文件: templateconfigurator.properties中的RDBMS_DRIVER_LOCATION6.启动SAP系统执行命令: R3trans –dx执行命令: startsap r3。

10.2.0.4 RAC 裸设备升级11.2.0.4.0汇总(推荐文档)

10.2.0.4 RAC 裸设备升级11.2.0.4.0汇总(推荐文档)

声 明本文件所有权和解释权归所有,未经****书面许可,不得复制或向第三方公开。

This document is the property of **** and can be neither reproduced nor disclosed to a third party without a writtenauthorization.修订历史记录拟制 小明 日期 2013/10/25 审核 日期 批准日期(A-添加,M-修改,D-删除)1方案介绍目前现网数据库Oracle 10.2.0.4 RAC升级到11.2.0.4方法主要有3种,一种是直接手工升级的方式,二种是通过dbua升级,即在现有生产环境中将数据库版本从10gr2升到11gr2,三种是采用异机迁移升级的方式实施,根据目前资源情况,我们计划采用第二种方式进行数据库升级。

我们这里讲的是Linux 5.5 10.2.0.4 RAC 祼负备升级到11.2.0.4,dbua升级方式,针对AIX平台有所不同。

说明:迁移升级相对于直接升级的风险性相对较低,但是需要的硬件资源较多,就目前硬件资源来说,不能满足迁移升级条件。

2操作时间评估3操作步骤4.对oracle10g环境备份1、升级前须增加一个scan ip 跟VIP同一网段。

2、做安装前必须对原有oracle 10g数据以及环境作备份,备份的内容有oraInventory、asm disk header、ocr、4.1 创建文件系统、用户组4.2 停应用4.3 停监听lsnrctl stop4.4 停数据库4.5 设置环境变量4.6 升级前检查是否满足升级条件4.7 使用Oracle用户进行安装升级首先应用新的环境变量,切换到grid_env进行安装.+ASM14.8 升级CRS--这里选择第三项:Upgrade Oracle Grid Infrastucture or Oracle Automatic Storage Management--以上有图片没有保存,主要是检查没有问题就可以一直下一步。

Oracle Database 11g Release 2 升级最佳实践指南说明书

Oracle Database 11g Release 2 升级最佳实践指南说明书

Passed
• Remove your 11.2.0.1 home contents • Install 11.2.0.2 into the previous 11.2.0.1 home • Restore /dbs and /network/admin files • Upgrade your database with DBUA or catupgrd.sql
2011 Oracle Corporation
13
Upgrade Blog: /UPGRADE
2011 Oracle Corporation
14
Best Practice #2
• Always upgrade Grid Infrastructure (Clusterware and ASM) First!
Clusterware & ASM: rolling upgrade
2011 Oracle Corporation
18
Oracle Grid Infrastructure 11.2.0.2
• Oracle Grid Infrastructure Patch Set 11.2.0.2:
• Patch set is not the correct wording: it’s a full release • Installation is out-of-place only into a separate home • To upgrade from GI 11.2.0.1 to GI 11.2.0.2:
<Insert Picture Here>
Best Practices for Upgrading to Oracle Database 11g Release 2

ORACLE 11G升级

ORACLE 11G升级

单机ORACLE 11.2.0.1.0升级到11.2.0.4.0系统版本:Enterprise-R5-U8-Server-x86_64-dvd.iso1 确认原数据库版本:查看各组件版本号:select comp_name,status,version from dba_server_registry;确认数据库版本信息:select * from v$version;1 确认没有物化视图正在刷新:SELECT * FROM sys.obj$ o, er$ u, sys.sum$ s WHERE o.type# = 42 AND bitand(s.mflags, 8) = 8;2 确认没有数据文件需要恢复:SELECT * FROM v$recover_file;3 确认没有数据文件正在begin backup模式:SELECT * FROM v$backup WHERE status != 'NOT ACTIVE';4 确认没有分布式事物,如有执行下面清理的语句(关库升级,这一步可以不要) SELECT * FROM dba_2pc_pending;SELECT local_tran_id FROM dba_2pc_pending;EXECUTE dbms_transaction.purge_lost_db_entry('local_tran_id');COMMIT;5 确认回收站有无对象,如有先清理PURGE dba_recyclebin原库备份后停库,停止监听,全库冷备份,有条件的话备份$ORACLE_HOME和oraInventory 文件夹下所有文件2 新建目录并修改权限(用于防止升级失败回退)3 修改环境变量并注释掉原先的变量4 上传文件并解压:p1*******_112040_Linux-x86-64_1of7.zipp1*******_112040_Linux-x86-64_2of7.zip5 运行runInstaller升级:取消更新通知,点击继续:选择跳过软件更新,继续:选择更新现有数据库:选择产品语言(最好和之前安装软件时选择的一致):继续选择版本,要和之前的一致,继续选择安装软件目录,我们这里是新建的目录,且已经配置环境变量,所以直接就显示出来了,选择组别,我这里这个位置是空白,自己填上即可,继续检查,数据库已经安装,这里一般没有问题,继续:开始安装新软件,继续:监听配置按一般配置就可以,或者直接取消,之后将原来的监听文件拷贝到新目录也可以之后会出现DBUA升级界面:直接继续:选择你要升级的数据库,警告文件,没什么大问题就继续:升级选择,升级结束后编译无效对象,升级时区不选择,备份不选择,继续:升级过程中是否移动数据文件,根据实际情况选择,我这里不移动,继续:指定快速恢复区,网上说能取消,我这里不能,但是可以修改位置,我这里没有修改,继续:是否使用EM配置数据库,取消,继续:概述,确认后继续安装:此时监听和数据库都启动了:确认数据库版本信息:select * from v$version; 确认数据库升级信息:set pages 2000 lines 500col action format a17col namespace format a10col version format a10col comments format a30col action_time format a30col bundle_series format a15select * from DBA_REGISTRY_HISTORY;确认数据库各组件信息:select comp_name,status,version from dba_server_registry;查看是否有失效的对象,有就重新编译select * from dba_objects where status='INVALID';@$ORACLE_HOME/rdbms/admin/utlrp.sql修改compatible参数至11.2.0.4.0 (此值10g 后只能由小改大,我这里没有修改)SQL> show parameter compatibleNAME TYPE VALUE------------------------------------ ----------- ------------------------------compatible string 11.2.0.0.0alter system set compatible='11.2.0.4.0' scope=spfile;静默升级:1 原库备份后停库,停止监听,全库冷备份,并备份$ORACLE_HOME和oraInventory文件夹下所有文件2 新建目录并修改权限(用于防止升级失败回退)3 上传文件,解压并修改权限4 修改环境变量,(我这里只是ORACLE_HOME的变量有变化)并立即生效(退出再进入)5 执行升级脚本:$ cd database./runInstaller -silent -debug -force -ignorePrereq \DECLINE_SECURITY_UPDATES=true \oracle.install.option=INSTALL_DB_SWONLY \UNIX_GROUP_NAME=oinstall \INVENTORY_LOCATION=/u01/app/oraInventory \ORACLE_HOME=/u01/app/oracle/product/11.2.0.4.0/db \ORACLE_BASE=/u01/app/oracle \oracle.install.db.InstallEdition=EE \oracle.install.db.DBA_GROUP=dba \oracle.install.db.OPER_GROUP=oinstall打开一个新窗口,执行root.sh修改/etc/oratab 内容为最新位置复制数据库文件,参数文件密码文件监听文件到新位置,并启动监听,使用sqlplus 登录。

ORACLE_11.2.0.1.0_升级到11.2.0.4.0操作步骤

ORACLE_11.2.0.1.0_升级到11.2.0.4.0操作步骤

ORACLE 11.2.0.1.0 升级到11.2.0.4.0操作步骤升级目的测试环境的所有数据库版本升级到 11.2.0.4.0 保证和生产库一致,避免测试过程中数据库版本不一致导致的程序问题。

操作步骤1、关闭数据库和监听lsnrctl stopsqlplus / as sysdbashutdown immediate;host emctl stopdbconsole;2、安装新版数据库(11.2.0.4.0)设置ORALCE_BASEvi ~/.bash_profile设置原:ORALCE_BASE=/u01/app/oracle新:ORALCE_BASE=/u02/app/oraclesource ~/.bash_profile创建目录和设置ORACLE_HOME权限mkdir -p $ORACLE_HOME ;chown -R oracle:oinstall $ORACLE_HOMEchmod -R 755 $ORACLE_HOMEcd /home/oracle/database && ./runInstaller开始安装新版数据库安装程序取消监听配置跳过监听配置启动升级助手 DBUA,,选择需要升级的数据库点击YES,后升级过程可能比较久,耐心等待。

,如果升级过程中出现问题,我们可以关闭数据库后,重新运行dbua 来重新升级上次失败的组件升级完成。

3、验证数据库版本Select version FROM Product_component_version Where SUBSTR(PRODUCT,1,6)='Oracle';select * from v$version;若升级后,出现对象无效问题建议如下操作-- oracle 11g升级@?/rdbms/admin/catupgrd.sql -- 时间大概是30-40分钟STARTUP@?/rdbms/admin/utlu112s.sql@?/rdbms/admin/catuppst.sql@?/rdbms/admin/utlrp.sql@?/rdbms/admin/dbupgdiag.sql注意事项1、若存在多个数据库实例,注意进行实例切换,如: export ORACLE_SID=orcl 或 exportORACLE_SID=test2、数据库软件安装前会对系统环境条件进行检查,须将提示的问题进行解决,不然SWAP空间不足。

10.2.0.4 RAC 裸设备升级11.2.0.4.0汇总

10.2.0.4 RAC 裸设备升级11.2.0.4.0汇总

声 明本文件所有权和解释权归所有,未经****书面许可,不得复制或向第三方公开。

This document is the property of **** and can be neither reproduced nor disclosed to a third party without a writtenauthorization.修订历史记录拟制 小明 日期 2013/10/25 审核 日期 批准日期(A-添加,M-修改,D-删除)1方案介绍目前现网数据库Oracle 10.2.0.4 RAC升级到11.2.0.4方法主要有3种,一种是直接手工升级的方式,二种是通过dbua升级,即在现有生产环境中将数据库版本从10gr2升到11gr2,三种是采用异机迁移升级的方式实施,根据目前资源情况,我们计划采用第二种方式进行数据库升级。

我们这里讲的是Linux 5.5 10.2.0.4 RAC 祼负备升级到11.2.0.4,dbua升级方式,针对AIX平台有所不同。

说明:迁移升级相对于直接升级的风险性相对较低,但是需要的硬件资源较多,就目前硬件资源来说,不能满足迁移升级条件。

2操作时间评估3操作步骤4.对oracle10g环境备份1、升级前须增加一个scan ip 跟VIP同一网段。

2、做安装前必须对原有oracle 10g数据以及环境作备份,备份的内容有oraInventory、asm disk header、ocr、votedisk、/etc/oratab、用户环境变量,Unset Oracle用户所有的环境变量4.1 创建文件系统、用户组创建文件系统,大小50GB,属主oracle:oinstall。

4.2 停应用4.3 停监听lsnrctl stop4.4 停数据库4.5 设置环境变量4.6 升级前检查是否满足升级条件4.7 使用Oracle用户进行安装升级首先应用新的环境变量,切换到grid_env进行安装.[oracle@rac1 ~]$ source .11bash_profile[oracle@rac1 ~]$ grid_env[oracle@rac1 tmp]$ echo $ORACLE_HOME/oracle/app/11.2.4/grid[oracle@rac1 tmp]$ echo $ORACLE_SID+ASM14.8 升级CRS--这里选择第三项:Upgrade Oracle Grid Infrastucture or Oracle Automatic Storage Management--以上有图片没有保存,主要是检查没有问题就可以一直下一步。

Oracle11.2.0.1升级到11.2.0.4

Oracle11.2.0.1升级到11.2.0.4

Oracle11.2.0.1升级到11.2.0.4系统环境:Linux standby 2.6.32-573.el6.x86_64 #1 SMP Wed Jul 1 18:23:37 EDT 2015 x86_64x86_64x86_64 GNU/Linux1. 讲补丁包上传到 oracle server ,解压、安装[root@standby database]#unzip p1*******_112040_Linux-x86-64_1of7.zip -d /tmp&& unzip p1*******_112040_Linux-x86-64_2of7.zip -d /tmp2. 检查当前版本SQL> select * from v$version;BANNER-------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit ProductionPL/SQL Release 11.2.0.1.0 - ProductionCORE 11.2.0.1.0 ProductionTNS for Linux: Version 11.2.0.1.0 - ProductionNLSRTL Version 11.2.0.1.0 – ProductionSQL> set linesize 150SQL> set pagesize 9999SQL> col comp_name format a40SQL> SELECT COMP_NAME, VERSION, STATUS FROM SYS.DBA_REGISTRY;COMP_NAME VERSION STATUS---------------------------------------- ------------------------------ -------- OWB 11.2.0.1.0 VALIDOracle Application Express 3.2.1.00.10 VALIDOracle Enterprise Manager 11.2.0.1.0 VALIDOLAP Catalog 11.2.0.1.0 VALIDSpatial 11.2.0.1.0 VALIDOracle Multimedia 11.2.0.1.0 VALIDOracle XML Database 11.2.0.1.0 VALIDOracle Text 11.2.0.1.0 VALIDOracle Expression Filter 11.2.0.1.0 VALIDOracle Rules Manager 11.2.0.1.0 VALIDOracle Workspace Manager 11.2.0.1.0 VALIDOracle Database Catalog Views 11.2.0.1.0 VALIDOracle Database Packages and Types 11.2.0.1.0 VALIDJServer JAVA Virtual Machine 11.2.0.1.0 VALIDOracle XDK 11.2.0.1.0 VALIDOracle Database Java Packages 11.2.0.1.0 VALIDOLAP Analytic Workspace 11.2.0.1.0 VALIDOracle OLAP API 11.2.0.1.0 VALID18 rows selected.3. 检查磁盘空间(system 必须要最少 10m)(新home最少4.7GB)SQL> select a.tablespace_name, round(a.total_size) "total_size(mb)",round(a.total_size) - round(b.free_size,3) "unsed_size(mb)", round(b.free_size,3) "free_size(mb)",round(b.free_size/total_size *100,2) ||'%' free_ratefrom(select tablespace_name,sum(bytes) /1024/1024 total_size from dba_data_filesgroup by tablespace_name) a,(select tablespace_name,sum(bytes)/1024/1024 free_sizefrom dba_free_spacegroup by tablespace_name) bwhere a.tablespace_name=b.tablespace_name(+);4.为数据库做冷备份RMAN>run {shutdown immediate;startup mount;allocate channel c1 type disk;allocate channel c2 type disk;backup full tag=’full_bak' database format '/home/oracle/full_cold_%d_%s.bak'; alter database open;}RMAN> list backup;数据库正常关闭后,还需要备份Oracle主目录,目的还是为了升级失败时,能够还原出数据库软件到升级前的版本。

Oracle数据库产品11g Release 2在线应用程序升级说明书

Oracle数据库产品11g Release 2在线应用程序升级说明书

Survive hardware failure
Online Application Upgrade
– the final piece of the HA jigsaw puzzle
High Availability
Make planned changes to software
Survive hardware failure
• 11.2 brings these revolutionary new features: the edition, the editioning view, and the crossedition trigger
• Code changes are installed in the privacy of a new edition
effort • Conclusion / Q&A
Scope
• This presentation explains new capabilities in Oracle Database 11g Release 2 that support online upgrade of the database tier of an application
Survive hardware failure
Change application’s database objects
Change infrastructure: Operating system Oracle Database
Online Application Upgrade
– the final piece of the HA jigsaw puzzle
Online Application Upgrade

Oracle 11gR2升级从11.2.0.3到11.2.0.4

Oracle 11gR2升级从11.2.0.3到11.2.0.4

本文档是使用新的ORACLE_HOME的方式进行升级1.安装11.2.0.4软件2.升级前的检查升级之前,以oracle用户登录到主机,并使用11.2.0.3的环境变量。

需要在11.2.0.3环境的数据库中执行下列操作:首先要确认数据库可以在11.2.0.3环境下正常启动、运行。

2.1.将升级预检查脚本拷贝到临时目录说明:此为准备步骤,升级前提前执行完成;升级过程中不需要执行。

将11.2.0.4 ORACLE Home中的预升级检查工具(utlu112i.sql文件)拷贝到升级中使用的一个临时目录,该文件在$ORACLE_HOME/rdbms/admin目录:mkdir $HOME/workcd $HOME/workcp /oracle11g/app/oracle/product/11.2.0/dbhome_1/rdbms/admin/utlu112i.sql ./ 2.2.执行升级预检查脚本utlu112i.sql说明:此为准备步骤,升级前提前执行完成;升级过程中再执行一遍以确认最终状态。

说明:使用源Oracle Home。

cd $HOME/work$ sqlplus '/ as sysdba'set time onspool upgrade_info.log@utlu112i.sqlspool off;执行预检查脚本将生成日志文件upgrade_info.log,该文件记录了当前数据库升级到11.2.0.4在参数、配置、表空间、组件等方面需要关注的问题,需要根据这些提示信息调整11.2.0.3数据库以为升级做好准备。

清空回收站:purge dba_recyclebin;2.3. 升级前检查数据库的完整性a.确认所有Oracle提供的数据库组件/对象的状态是“VALID”编译失效对象,用sys用户编译,执行多次直到失效对象不再变化。

注意:SYS和SYSTEM用户不能有INV ALID对象。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Oracle 11g R2 升级方案一、版本升级路线Table 2-1 contains the required upgrade path for each release of Oracle Database. Use the upgrade path and the specified documentation to upgrade your database.Table 2-1 Upgrade Paths二、滚动升级Table 1-2 summarizes the various methods for performing rolling upgrades. Also, see Oracle Database High Availability Best Practices for help choosing a method to perform database upgrades.Table 1-2 Methods for Performing Rolling Upgrades三、升级方法Depending on the environment, there are several alternatives available when upgrading a database. This section discusses why a particular method would be chosen, lists considerations when using each method, and gives pointers to additional useful information.Database Upgrade Assistant (DBUA)The DBUA provides a graphical user interface (GUI) that guides a user through the in-place upgrade of a database. It is the recommended method for performing either a major release upgrade or patch release upgrade.The DBUA automates the upgrade process by performing all of the tasks that would otherwise need to be performed manually. It can be launched during installation of Oracle Database 11g Release 2 with the Oracle Universal Installer or it can be launched as a standalone tool at any time after installation is complete.The DBUA is a very useful tool, because it evaluates the current database and makes appropriate recommendations for configuration options such as tablespace sizes, cluster checks, initialization parameters, and Automatic Storage Management upgrades.DBUA is a good choice if the upgrade environment has the following characteristics: ∙Operating system remains the same (including upgrades in the same OS family, such as Windows XP to Windows Vista or Solaris 2.8 to Solaris 2.10)∙Graphical user interface is preferred over manual interface∙Real Application Clusters or Automatic Storage Management is installedo Much easier and less error prone than manual method – HIGHLY recommended!∙Existing database is at least 9.2.0.4 for Oracle Database 11g Release 1 and 9.2.0.8 for Oracle Database 11g Release 2Considerations for using DBUA:∙Databases must be on the same system (in-place upgrade where the new version of Oracle is installed on the same server as the existing version). The DBUA cannot upgrade a database remotely.For more information:∙Oracle Database Upgrade Guide 11g Release 2∙Oracle Database Upgrade Companion 11g Release 2∙Oracle Database 11g Upgrade page on OTN∙Complete Checklist to Upgrade to 11g Release 2 using DBUA (My Oracle Support Note 870814.1))Manual Upgrad eA manual upgrade consists of running SQL scripts and utilities from a command line to do an in-place upgrade of a database to the new Oracle Database 11g release. Although a manual upgrade gives finer control over the upgrade process, it is more susceptible to error if any of the upgrade steps are not followed or are performed out of order.Unlike the DBUA, the Pre-Upgrade information Tool (utlu111i.sql) that is shipped with the Oracle Database 11 software must be run manually to see what changes must be made to the target database. It performs checks on configuration options such as components, init parameters, and tablespace sizes.Manual upgrade is a good choice if the upgrade environment has the following characteristics: ∙Manual interface is preferred over graphical user interface∙Existing database is at least 9.2.0.4 for Oracle Database 11g Release 1 and 9.2.0.8 for Oracle Database 11g Release 2 (1 step upgrade). Manual upgrades can be done for databases before 9.2.0.x, but 2 steps are required versus 1. For example, if upgrading from 8.1.7.4, it is necessary to first upgrade to 10.2.0.x and then to 11.1 or 11.2. Considerations for manual upgrade:∙Cannot change operating system architectureFor more information:∙Oracle Database Upgrade Guide 11g Release 2∙Oracle Database Upgrade Companion 11g Release 2∙Oracle Database 11g Upgrade page on OTN∙Complete Checklist for Manual Upgrades to 11g Release 2 (My Oracle Support Note 837570.1))Oracl e Data Pump Export and Import / Original Export and ImportIn this method, the Export and Import utilities physically copy data from the current database to a new database. When upgrading from Oracle Database 10g or higher, Data PumpExport and Import are strongly recommended for improved performance and better manageability.Oracle Data Pump Export/Import and original Export/Import perform a full or partial export from the current database, followed by a full or partial import into a new Oracle Database 11g.In order to have two physical copies of the database, along with the dump file set, a significant amount of disk space may be required. However, the user has the flexibility (especially with Data Pump) to choose subsets of the database to export such as tablespaces, schemas, tables, and rows, leaving the original database unchanged. In addition, Data Pump Export/Import has two features that can help with this issue. First, Data Pump Import can be used in Network Mode, which allows the new Oracle database to be directly loaded across the network from the old database being upgraded. Thus, no intervening dump files are required. Second, when using Data Pump Export and Import in Oracle Database 11g, the imported data can be compressed with the Oracle Advanced Compression Option to improve performance (only when going from 11g Release 1 to Release 2 or for patch set upgrades from Oracle Database 11g onward).Data Pump Export/Import and original Export/Import do not change the existing database, which enables the database to remain available throughout the upgrade process. Data Pump Export and Import use Flashback technology to get a consistent view of the data. However, neither Data Pump Export/Import nor original Export/Import provide consistent snapshots by default.Because the current database can remain available, the existing production database can be kept available for read-only transactions while the new Oracle Database 11g database is being built at the same time by Data Pump Export/Import or original Export/Import. The current database can then be deleted once the upgraded system is determined to be fully functional.Note that Data Pump Export/Import is supported starting in Oracle Database 10g. When upgrading an Oracle database that is older than 10g, original Export and Import must be used. Data Pump Export/Import or Export/Import is a good choice if the upgrade environment has the following characteristics:∙Migration to different operating system architecture or hardware platform∙Source database is running on a version such as 8.0.3 or 8.1.6 that is not directly upgradable to the target version∙Side-by-side testing of the old and new versions of Oracle Database is needed (because an entirely new database is created)∙New database will be restructured (i.e. new tablespaces will be created and populated by imported data, or a new partitioning scheme will be implemented)Considerations for using Data Pump Export/Import or Export/Import:∙Downtime will be much longer than other methods, depending on size of the database(i.e. 10+ hours for large databases). This can be tested by running a test export into thefile system and then doubling or tripling the amount of time that would be required for the subsequent import.∙Additional disk space will be necessary to store both the export dump files and the new copy of the databaseFor more information:∙Oracle Database Upgrade Guide 11g Release 2∙Oracle Database Utilities 11g Release 2 (Part Number E10701-02)∙Oracle Database Upgrade Companion 11g Release 2∙Oracle Database 11g Upgrade web page on OTN∙Oracle Database Utilities web page on OTNOracl e Transportable TablespacesOracle Transportable Tablespaces (TTS) is an option for performing database upgrades in less than one hour for databases that have simple schemas and where the data files do not need to be transferred as part of the transport process (such as when the data files will be used in place, or when shared storage is available in a system migration).With this method, an empty 11g Release 2 database is created and data is moved from the existing database to the 11g Release 2 database. Metadata for tables and indices and the objects needed to support the tables and indices in the tablespaces is exported from the existing database and then imported into the new database using Data Pump Export/Import or original Export/Import. The majority of time taken for the upgrade is for the metadata export and import, and this is where there may be less than optimal performance.Transportable Tablespaces has been used effectively to reduce database upgrade time. However, because it was not originally designed as a database upgrade solution, it does not have the same level of automation as the DBUA. Consider whether the added testing time and complexity of using a TTS upgrade are worth the potential to reduce downtime during the upgrade.Starting with Oracle Database 10g, tablespaces can be moved across platforms. Many, but not all platforms are supported for cross platform tablespace transport. A cross-endian move involves an RMAN convert, but is a simple operation across platforms within the same endian group.Note that the time needed for the RMAN convert is essentially equivalent to the time needed for an RMAN backup of the database.Transportable Tablespaces is a good choice if the upgrade environment has the following characteristics:∙Downtime must be less than one hour∙Data files do not need to be transferred as part of the transport process∙Existing database’s object structure is not complexConsiderations when using Transportable Tablespaces:∙Metadata gets transported from the existing database to the new database and may increase upgrade time. If desired, a time estimate can be obtained by performing a metadata-only export on the source database.∙Higher level of skill is required for the database administratorFor more information:∙Oracle Database Administrator’s Guide 11g Release 2 (Part Number E10595-04)∙Database Upgrade Using Transportable Tablespaces: Oracle Database 11g Release 1 white paper∙Platform Migration Using Transportable Tablespaces: Oracle Database 11g Release 1white paper∙Platform Migration Using Transportable Database: Oracle Database 11g and 10g Release 2 white paperOracl e Data Guard SQL Apply (Logical Standby)Starting with Oracle Database 10 (10.1.0.3), Data Guard SQL Apply (logical standby) can be used to perform a database rolling upgrade with minimal downtime. The upgrade can be to a higher Oracle Database release or a later patch set. The overall downtime can be as little as the time it takes to perform a switchover.What is Oracle Data Guard? Oracle Data Guard provides the management, monitoring, and automation software infrastructure to create and maintain one or more standby databases to protect Oracle data from failures, disasters, errors, and data corruptions. There are two types of standby databases. A physical standby uses Redo Apply to maintain a block for block, exact replica of the primary database. A logical standby uses SQL Apply and contains the same logical information as the primary database, although the physical organization and structure of the data can be different. SQL Apply also enables rolling upgrades by allowing the synchronization of a standby database with a primary database that is using an earlier release of the Oracle Database.A database rolling upgrade entails first upgrading a logical standby database to a later Oracle release or patch set, and then allowing SQL Apply to re-synchronize the primary and standby databases. When the administrator is satisfied that the upgrade has been successful, the process is completed by using a Data Guard switchover operation to transition the standby to the primary role. The only downtime experienced by applications is the time needed to complete the switchover process and reconnect clients to the new primary database. The actual database upgrade is performed while applications continue to access the original production database.Beginning with Oracle Database 11g, Data Guard physical standby users can also benefit from rolling database upgrades by temporarily converting a physical standby to a transient logical standby database, enabling SQL Apply to synchronize the primary and standby databases while they operate at different Oracle releases or patch sets. The transient logical process is attractive because it can use existing physical standby databases and it only requires a single catalog upgrade to migrate both primary and standby databases to the new Oracle release. When the upgrade to process is complete, the configuration reverts to its original state of having a primary with a physical standby database.Oracle Data Guard SQL Apply is a good choice if the upgrade environment has the following characteristics:∙Oracle Data Guard SQL Apply is installed∙Minimal downtime is a requirement∙Current database is at least 10.1.0.3Considerations when using Oracle Data Guard SQL Apply:∙Operating systems must be the same∙Higher level of skill is required for the database administratorFor more information:∙Oracle Database Administrator’s Guide 11g Release 2∙Oracle Maximum Availability Architecture Best Practices web page on OTN∙Database Rolling Upgrade Using Data Guard SQL Apply – Oracle Database 11g and 10g R2 white paper∙Database Rolling Upgrade Using Physical Standby Databases and the Transient Logical Rolling Upgrade ProcessOnline Database Upgrad e with Oracle StreamsOracle Streams can be used to achieve little or no database downtime during database or patchset upgrades. A database can be migrated to different platform, for example Intel Solaris to Intel Linux, or to a different character set. A copy of the current database is upgraded using Oracle Streams to keep changes synchronized during the upgrade process. The only downtime that occurs is during the switch from the current database to the new database.Oracle Streams is a good choice if the upgrade environment has the following characteristics: ∙Operating systems are different∙Little or no downtime is a requirement∙Current database is at least 9.2Considerations when using Oracle Streams:∙Performance restrictions may occur in an OLTP environment if the copy of the database does not keep up with existing database∙Significant amount of expertise is required by the database administratorFor more information:∙Oracle Database Administrator’s Guide 11g Release 2∙Oracle Streams Concepts and Administration 11g Release 2, Appendix D (Part Number E10704-02)结论Database Upgrade Assistant is the preferred method for upgrading a database to Oracle Database 11g Release 2. However, it is not always possible to use the DBUA, and in such situations there are other options available.Choosing the appropriate upgrade method depends on the environment, amount of downtime that is acceptable, and tolerance for complexity of the database administrator doing the upgrade. It is important for the database administrator to understand the various upgrade methods and choose the one that best suits business requirements.四、方法比较五、方法建议根据实际情况,涉及到服务器操作系统更换版本,数据库版本升级,较短停机时间。

相关文档
最新文档