Oracle 11g单实例GI and DB升级

1.   升级Grid Infrastructure

1.1    升级前准备

1.1.1     软件准备

这个当然不用多说:下载、上传到服务器、解压

 

1.1.2     新建GI的新HOME

mkdir -p /u01/app/11.2.0.4/grid

chown -R grid:oinstall /u01/app/11.2.0.4

chmod -R 775 /u01/app/11.2.0.4

 

1.2    进行升级

[root@Oracle-LAB app]# su - grid

[grid@Oracle-LAB ~]$ cd /software/grid/

[grid@Oracle-LAB grid]$ ./runInstaller


 

 

 

 

 

 

根据以上提示执行:

[root@Oracle-LAB /]#/u01/app/grid/product/11.2.0.4/grid/rootupgrade.sh

Performing root user operation for Oracle 11g

The following environment variables are setas:

   ORACLE_OWNER= grid

   ORACLE_HOME= /u01/app/grid/product/11.2.0.4/grid

 

Enter the full pathname of the local bindirectory: [/usr/local/bin]:

The contents of "dbhome" have notchanged. No need to overwrite.

The contents of "oraenv" have notchanged. No need to overwrite.

The contents of "coraenv" have notchanged. No need to overwrite.

 

Entries will be added to the /etc/oratab fileas needed by

Database Configuration Assistant when adatabase is created

Finished running generic part of root script.

Now product-specific root actions will beperformed.

Using configuration parameter file:/u01/app/grid/product/11.2.0.4/grid/crs/install/crsconfig_params

Creating trace directory

 

ASM Configuration upgraded successfully.

 

Creating OCR keys for user 'grid', privgrp'oinstall'..

Operation successful.

LOCAL ONLY MODE

Successfully accumulated necessary OCR keys.

Creating OCR keys for user 'root', privgrp'root'..

Operation successful.

CRS-4664: Node oracle-lab successfully pinned.

Replacing Clusterware entries in inittab

Replacing Clusterware entries in inittab

 

oracle-lab    2014/01/03 13:25:23    /u01/app/grid/product/11.2.0.4/grid/cdata/oracle-lab/backup_20140103_132523.olr

 

oracle-lab    2013/12/02 17:22:18    /u01/app/11.2.0/grid/cdata/oracle-lab/backup_20131202_172218.olr

Successfully configured Oracle GridInfrastructure for a Standalone Server

 

完成后在当前GRID帐号下运行:crsctl query has softwareversion查看当前版本信息。

[grid@Oracle-LAB grid]$ crsctl query has softwareversion

Oracle High Availability Services version onthe local node is [11.2.0.4.0]

 

1.3 修改改Grid帐号下的ORACLE_HOME值

[root@Oracle-LAB/]# gedit /home/grid/.bash_profile

ORACLE_SID=+ASM

ORACLE_BASE=/u01/app/grid

ORACLE_HOME=/u01/app/11.2.0.4/grid

PATH=$PATH:$ORACLE_HOME/bin

export PATH ORACLE_SID ORACLE_BASE ORACLE_HOME

1.4 重启oracle

[root@Oracle-LAB /]# cd/u01/app/11.2.0.4/grid/bin

[root@Oracle-LAB bin]# ./crsctlstop has

CRS-2791: Starting shutdown of Oracle HighAvailability Services-managed resources on 'oracle-lab'

CRS-2673: Attempting to stop'ora.LISTENER.lsnr' on 'oracle-lab'

CRS-2673: Attempting to stop 'ora.DATA01.dg'on 'oracle-lab'

CRS-2673: Attempting to stop 'ora.FRA.dg' on'oracle-lab'

CRS-2673: Attempting to stop 'ora.orcl.db' on'oracle-lab'

CRS-2677: Stop of 'ora.DATA01.dg' on'oracle-lab' succeeded

CRS-2677: Stop of 'ora.FRA.dg' on 'oracle-lab'succeeded

CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'oracle-lab'succeeded

CRS-2677: Stop of 'ora.orcl.db' on'oracle-lab' succeeded

CRS-2673: Attempting to stop 'ora.DATA.dg' on'oracle-lab'

CRS-2677: Stop of 'ora.DATA.dg' on'oracle-lab' succeeded

CRS-2679: Attempting to clean 'ora.DATA.dg' on'oracle-lab'

CRS-2681: Clean of 'ora.DATA.dg' on'oracle-lab' succeeded

CRS-2673: Attempting to stop 'ora.asm' on'oracle-lab'

CRS-2677: Stop of 'ora.asm' on 'oracle-lab'succeeded

CRS-2673: Attempting to stop 'ora.cssd' on'oracle-lab'

CRS-2677: Stop of 'ora.cssd' on 'oracle-lab'succeeded

CRS-2673: Attempting to stop 'ora.evmd' on'oracle-lab'

CRS-2677: Stop of 'ora.evmd' on 'oracle-lab'succeeded

CRS-2793: Shutdown of Oracle High AvailabilityServices-managed resources on 'oracle-lab' has completed

CRS-4133: Oracle High Availability Serviceshas been stopped.

[root@Oracle-LAB bin]#./crsctl start has

CRS-4123: Oracle High Availability Serviceshas been started.

完成重启后检查版本:

[root@Oracle-LAB bin]# ./crsctlquery has releaseversion

Oracle High Availability Services releaseversion on the local node is [11.2.0.4.0] 

 

2.     升级数据库软件

2.1    升级前准备

2.1.1     软件准备

这个当然不用多说:下载、上传到服务器、解压

 

2.1.2     新建DB软件的新HOME

mkdir -p/u01/app/oracle/product/11.2.0.4/dbhome_1

chown -R oracle:oinstall/u01/app/oracle/product/11.2.0.4

chmod -R 775 /u01/app/oracle/product/11.2.0.4

 

2.1.3     检查Oracle软件版本

[oracle@Oracle-LAB ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on MonJan 6 13:08:12 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release11.2.0.3.0 - 64bit Production

With the Partitioning, Automatic StorageManagement, OLAP, Data Mining

and Real Application Testing options

 

2.1.4     备份数据库

不再详述。

 

2.2    进行升级

[oracle@Oracle-LAB ~]$ unset ORACLE_BASE

[oracle@Oracle-LAB ~]$ unset ORACLE_HOME

[oracle@Oracle-LAB ~]$ unset ORACLE_SID

[oracle@Oracle-LAB ~]$ cd /software/database/

 

 

 

 

 

 

 

 

 

 

[root@Oracle-LAB ~]# /u01/app/oracle/product/11.2.0.4/dbhome_1/root.sh

Performing root user operation for Oracle 11g

The following environment variables are setas:

   ORACLE_OWNER= oracle

   ORACLE_HOME= /u01/app/oracle/product/11.2.0.4/dbhome_1

 

Enter the full pathname of the local bindirectory: [/usr/local/bin]:

The contents of "dbhome" have notchanged. No need to overwrite.

The contents of "oraenv" have not changed.No need to overwrite.

The contents of "coraenv" have notchanged. No need to overwrite.

 

Entries will be added to the /etc/oratab fileas needed by

Database Configuration Assistant when adatabase is created

Finished running generic part of root script.

Now product-specific root actions will beperformed.

Finished product-specific root actions.

 

 

3.     升级数据库

3.1    升级前检查

进入新目录下执行utlu112i.sql来进行升级前的检查:

[root@Oracle-LAB~]# su - oracle

[oracle@Oracle-LAB~]$ /u01/app/oracle/product/11.2.0.4/dbhome_1/bin/sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Mon Jan 6 13:33:40 2014

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bitProduction

With the Partitioning, Automatic Storage Management, OLAP, Data Mining

and Real Application Testing options

SQL> @/u01/app/oracle/product/11.2.0.4/dbhome_1/rdbms/admin/utlu112i.sql

Oracle Database 11.2 Pre-Upgrade Information Tool 01-06-2014 13:34:41

Script Version: 11.2.0.4.0 Build: 001

.

**********************************************************************

Database:

**********************************************************************

--> name:      ORCL

--> version:    11.2.0.3.0

--> compatible:    11.2.0.0.0

--> blocksize:       8192

--> platform:        Linux x86 64-bit

--> timezone file: V14

.

**********************************************************************

Tablespaces: [make adjustments in the current environment]

**********************************************************************

--> SYSTEM tablespace is adequate for the upgrade.

.... minimum required size: 932 MB

--> SYSAUX tablespace is adequate for the upgrade.

.... minimum required size: 701 MB

--> UNDOTBS1 tablespace is adequate for the upgrade.

.... minimum required size: 400 MB

--> TEMP tablespace is adequate for the upgrade.

.... minimum required size: 60 MB

--> EXAMPLE tablespace is adequate for the upgrade.

.... minimum required size: 310 MB

.

**********************************************************************

Flashback: OFF

**********************************************************************

**********************************************************************

Update Parameters: [Update Oracle Database 11.2 init.ora or spfile]

Note: Pre-upgrade tool was run on a lower version 64-bit database.

**********************************************************************

--> If Target Oracle is 32-Bit, refer here for Update Parameters:

-- No update parameter changes are required.

.

 

--> If Target Oracle is 64-Bit, refer here for Update Parameters:

-- No update parameter changes are required.

.

**********************************************************************

Renamed Parameters: [Update Oracle Database 11.2 init.ora or spfile]

**********************************************************************

-- No renamed parameters found. No changes are required.

.

**********************************************************************

Obsolete/Deprecated Parameters: [Update Oracle Database 11.2 init.ora orspfile]

**********************************************************************

-- No obsolete parameters found. No changes are required

.

 

**********************************************************************

Components: [The following database components will be upgraded orinstalled]

**********************************************************************

--> Oracle Catalog Views      [upgrade]  VALID

--> Oracle Packages and Types   [upgrade]  VALID

--> JServer JAVA Virtual Machine [upgrade]  VALID

--> Oracle XDK for Java         [upgrade] VALID

--> Oracle Workspace Manager  [upgrade]  VALID

--> OLAP Analytic Workspace     [upgrade]  VALID

--> OLAP Catalog           [upgrade]  VALID

--> EM Repository          [upgrade]  VALID

--> Oracle Text                [upgrade] VALID

--> Oracle XML Database      [upgrade] VALID

--> Oracle Java Packages      [upgrade]  VALID

--> Oracle interMedia           [upgrade]  VALID

--> Spatial                [upgrade]  VALID

--> Expression Filter              [upgrade]  VALID

--> Rule Manager           [upgrade]  VALID

--> Oracle Application Express    [upgrade]  VALID

... APEX will only be upgraded if the version of APEX in

... the target Oracle home is higher than the current one.

--> Oracle OLAP API              [upgrade]  VALID

.

**********************************************************************

Miscellaneous Warnings

**********************************************************************

WARNING: --> Your recycle bin is turned on and currently contains noobjects.

.... Because it is REQUIRED that the recycle bin be empty prior toupgrading

.... and your recycle bin is turned on, you may need to execute thecommand:

      PURGE DBA_RECYCLEBIN

.... prior to executing your upgrade to confirm the recycle bin is empty.

WARNING: --> Database contains schemas with objects dependent onDBMS_LDAP package.

.... Refer to the 11g Upgrade Guide for instructions to configure NetworkACLs.

.... USER APEX_030200 has dependent objects.

.

**********************************************************************

Recommendations

**********************************************************************

Oracle recommends gathering dictionary statistics prior to

upgrading the database.

To gather dictionary statistics execute the following command

while connected as SYSDBA:

 

    EXECUTEdbms_stats.gather_dictionary_stats;

 

**********************************************************************

Oracle recommends reviewing any defined events prior to upgrading.

 

To view existing non-default events execute the following commands

while connected AS SYSDBA:

  Events:

    SELECT(translate(value,chr(13)||chr(10),' ')) FROM sys.v$parameter2

      WHERE  UPPER(name) ='EVENT' AND  isdefault='FALSE'

 

  Trace Events:

    SELECT(translate(value,chr(13)||chr(10),' ')) from sys.v$parameter2

      WHERE UPPER(name) ='_TRACE_EVENTS' AND isdefault='FALSE'

 

Changes will need to be made in the init.ora or spfile.

 

**********************************************************************

 

3.2   运行DBUA来升级数据库

以Oracle帐户进入新目录运行DBUA

[root@Oracle-LAB/]# su - oracle

[root@Oracle-LAB ~]$ cd /u01/app/oracle/product/11.2.0.4/dbhome_1/bin

[oracle@Oracle-LABbin]$ ./dbua

 

 

 

 

 

 

 

  

3.3    修改Oracle帐号的ORACLE_HOME

[root@Oracle-LAB/]# gedit /home/oracle/.bash_profile

export PATH

ORACLE_SID=ORCL

ORACLE_BASE=/u01/app/oracle

ORACLE_HOME=$ORACLE_BASE/product/11.2.0.4/dbhome_1

PATH=$PATH:$ORACLE_HOME/bin

export PATH ORACLE_SID ORACLE_BASE ORACLE_HOME

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值